Stop reading from users.gh_login - #14764
Merged
Merged
Conversation
Turbo87
reviewed
Sep 23, 2026
carols10cents
force-pushed
the
stop-reading-from-users-gh-login
branch
from
September 24, 2026 15:50
98b59bd to
46e4a68
Compare
This comment has been minimized.
This comment has been minimized.
Instead join to `oauth_github.login`, which may not exist if there isn't an `oauth_github` record for that user. If there is no `oauth_github` record, that means the GitHub user has been deleted. We were previously setting the `url` field in user json to `https://github.com/{gh_login}`, but that can't possibly be correct if the GitHub user has been deleted. We marked the `url` field as deprecated in <#14537>. Rather than setting the deprecated field to an incorrect URL, this PR sets the deprecated field to text that isn't a URL but instead issues a deprecation message pointing to the new linked_accounts json instead.
This preserves the current behavior of the deprecated `url` fields when possible, but uses a valid URL (that goes to the user's crates.io page) when their GitHub account has been deleted.
Turbo87
force-pushed
the
stop-reading-from-users-gh-login
branch
from
September 28, 2026 08:34
46e4a68 to
b4090f0
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead join to
oauth_github.login, which may not exist if there isn't anoauth_githubrecord for that user.If there is no
oauth_githubrecord, that means the GitHub user has been deleted. We were previously setting theurlfield in user json tohttps://github.com/{gh_login}, but that can't possibly be correct if the GitHub user has been deleted.We marked the
urlfield as deprecated in #14537.Rather than setting the deprecated field to an incorrect URL, this PR sets the deprecated field to text that isn't a URL but instead issues a deprecation message pointing to the new linked_accounts json instead.
There are other solutions to the
urlfield problem I considered:urlto empty string rather than something that isn't a URLurlto a deprecation message or empty string, rather than only when there isn't a GitHub user, to direct more consumers of this API to move off theurlfieldurlto their crates.io user page URL insteadand there are probably other ideas. Open to thoughts and changes on that and any other aspect of this PR!
Extracted from #14575.
Connects to #13772.