Repository navigation
feat: link to GitHub Sponsors from profiles - #129
Merged
Merged
Conversation
When someone has a public GitHub Sponsors page, their profile shows a "Sponsor on GitHub" link next to their GitHub link. GitHub's REST API doesn't say whether a user has a sponsors page, so sign-in asks GraphQL for viewer.sponsorsListing.isPublic with the token from that sign-in. Only a public listing counts, since a draft one has no page to link to. If GitHub errors or times out, the last known value is kept and sign-in carries on. Like the rest of the profile it only refreshes on sign-in. Settings > Profile lists it with the other mirrored fields, and the personal data export includes it.
simonhamp
force-pushed
the
feat/sponsor-link
branch
from
October 15, 2026 18:07
4c1e367 to
02e9182
Compare
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.
If someone has a public GitHub Sponsors page, their profile now shows a "Sponsor on GitHub" link next to their GitHub link.
GitHub's REST API doesn't say whether someone has a Sponsors page, so on sign-in
SyncGitHubUserasks the GraphQL API forviewer.sponsorsListing.isPublicusing the token from that sign-in. The field is public, so it shouldn't need any scope beyond theuser:emailthe app already asks for. Only a public listing counts, because a draft or unapproved one has no page to link to. The answer is stored in a newusers.has_sponsors_listingcolumn.This adds one request to GitHub during sign-in, with a 2 second connect timeout and 3 seconds in total. If it fails or times out, sign-in carries on and the last known value is kept. New users default to false.
Like bio and website, it only refreshes on sign-in, so someone who sets up Sponsors later gets the link the next time they sign in. Settings > Profile lists it with the other fields mirrored from GitHub, and the personal data export includes it.