Registry Mirror
Skip to content

Conversation

@SimonCropp

@SimonCropp SimonCropp commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Why

GitHub Sponsors has no yearly tier, so a sponsor who pays for a year up front does it as a one-time payment, which SponsorCheck bundles for one month. Nothing in the payment says what it was for: at Verify's $5/$20/$30/$100 tiers (priced by company size), $1,200 is a year at $100 or twenty years at $5.

The first version of this PR inferred it: a payment on a one-time tier priced at exactly 12× a monthly tier was a year. That was still a guess. A project with a $5 monthly tier and a "$60 one time" thank-you tier would have given every $60 payment a year without anyone choosing that. So the author now says which amounts buy a year.

What changes

<PackageReference Include="SponsorCheck" Version="..." PrivateAssets="all"
                  GitHubSponsorsAccount="VerifyTests"
                  GitHubSponsorsYearlyPrices="60;240;360;1200" />

A one-time payment of exactly a listed amount is bundled for a calendar year from that payment. Any other one-time payment stays at one month, and with nothing listed every one-time payment is a month, as before.

  • Matched on the amount, not the tier. tier.monthlyPriceInCents on a one-time sponsorship is the amount paid, whether the sponsor picked a tier or typed a custom amount. GitHub hasn't let a profile turn custom amounts off since October 2022, so a sponsor who types $240 rather than clicking the $240 tier still gets the year. No tier flags or listing tiers are fetched. Only one-time payments can match.
  • A price need not be 12× a monthly tier, so a discounted year works.
  • ;-separated whole dollars, validated. A price that isn't a positive whole number fails the pack with the new SC110. ; rather than , means 1,200 fails instead of reading as $1 and $200.
  • Part of the shared fetch's key. The list decides which one-time sponsors are in the result. So it's passed to _SponsorCheck_FetchSponsorList, the result records the canonical list it was fetched with, and a project only takes a result fetched with its own list. A mismatch costs a fetch and never changes what is bundled. The fetch skips GitHub when the list doesn't parse, since every project fails with SC110 anyway.
  • The pack log says how many sponsors paid a listed price, the one way to confirm the list matches the profile's tiers.
  • Falls back safely. A missing or refused tier field leaves the payment at one month instead of failing the pack.
  • Wizard: the Options step offers the field when GitHub Sponsors is enabled, and only emits a list the bundler accepts.

Limits (documented in AuthorSetup.md)

  • GitHub keeps one sponsorship per sponsor, so only the latest payment is visible. An early renewal starts a new year from the renewal, and a smaller one-time payment after a yearly one drops the sponsor to that payment's month.
  • If an author changes a yearly price, the old price has to stay listed for a year, or sponsors who paid it drop to a month.
  • On the command line, each ; has to be written as %3B.

Docs

  • docs/AuthorSetup.md: a new "Yearly sponsors" section.
  • docs/BundlerDiagnosticCodes.md: SC110.
  • claude.md: the "One-time GitHub payments" section covers the setting, why nothing is inferred, the amount match, and the shared-fetch key. SC110 is added to the code list.

Tests

  • Unit: 530 run, 528 passed, 2 skipped (the Open Collective and Polar live lookups, which have no token here). New coverage: GitHubYearlyPricesTests (parsing, canonical form, cents), a "Declared yearly prices" block in GitHubSponsorsPlatformTests (fixed clock, plus an end-to-end fetch through a stubbed response that also checks a custom amount and the log line), shared-fetch matching and SC110 in BundleSponsorListTaskTests, the round trip in SharedFetchResultTests, and FetchSponsorListTaskTests.
  • Integration: 114 run, 113 passed, 1 skipped (OwnerMode_MultiTargetedRefCoverage_SkipsRedundantVerification, already marked [Skip]). New: AuthorPackTests.SharedFetch_YearlyPrices_ReachTheCallAndTheBundler (the list reaches the fetch call, the fetch runs once, and all three projects take its result) and YearlyPrices_ThatDoNotParse_FailThePackWithSC110.
  • Wizard: 260 passed. New generator tests, and the AuthorOptions screen snapshot is updated to show the field.

GitHub Sponsors has no yearly tier, so a sponsor paying for a year up
front does it as a one-time payment, which was bundled for 30 days
whatever the amount.

- A one-time payment counts for the amount over the lowest published
  monthly tier, rounded down and at least one month: $120 against a
  $10 tier is a year.
- Months are calendar months from the latest payment (tierSelectedAt).
  createdAt is the first payment for a sponsor who paid again, so a
  returning one-time sponsor was judged by their first payment.
- A missing or refused tier field falls back to the old one-month rule
  instead of failing the pack.
When monthly tiers are priced by who the sponsor is, the amount alone
can't say which tier a one-time payment was for: against Verify's
$5/$20/$30/$100 tiers, $1,200 is a year at $100 or twenty years at $5,
and the lowest-tier rule reads it as the latter.

A payment on a one-time tier the maintainer defined (tier.isOneTime
true, tier.isCustomAmount false) priced at exactly 12x one of the
published monthly tiers now counts for 12 months, so an author offers
yearly sponsorship by publishing a mirroring one-time tier for each
monthly tier. Every other one-time payment keeps the lowest-tier rule.

The yearly rule can only shorten what the lowest-tier rule gives, never
lengthen it, so one-time tiers meant for something else are unaffected.
A tier whose flags can't be read is priced like a custom amount.
Drops the amount-based sizing. Reading a duration from an amount is a
guess: when tiers are priced by the sponsor's size, $1,200 is a year at
$100 or twenty years at $5, and nothing in the payment says which. Every
one-time payment is back to one month, and the listing's tiers and the
sponsorship's tier are no longer fetched.

What stays is the dating fix. A sponsor who pays again keeps the same
sponsorship, so createdAt is their first payment and tierSelectedAt
their latest. Dated by createdAt, a returning one-time sponsor was
dropped a month after their first payment, however recently they paid.
PaidAt takes the later of the two, and a missing or refused
tierSelectedAt falls back to createdAt rather than failing the pack.
Replaces the 12x-tier rule. GitHub Sponsors has no yearly tier, so a
year paid up front is a one-time payment, and nothing in the payment says
what it was for. Inferring it ("a one-time tier at 12x a monthly tier is a
year") still guessed: a $60 thank-you tier on a $5 project would silently
have become a year.

Now the author lists the amounts that buy a year, with
GitHubSponsorsYearlyPrices="60;240;360;1200" on the SponsorCheck
reference. A one-time payment of exactly a listed amount counts for a
calendar year from that payment; anything else stays at one month.

- Matched on the amount (tier.monthlyPriceInCents), so a custom amount
  equal to a listed price counts too. GitHub doesn't let a profile turn
  custom amounts off. No tier flags or listing tiers are fetched.
- Whole dollars separated by ';'. A price that isn't a positive whole
  number fails the pack with the new SC110, so "1,200" can't quietly read
  as $1 and $200.
- Part of the shared fetch's key: passed to the fetch call, recorded on
  the result in canonical form, and checked by the bundler before taking
  it. The fetch skips GitHub when the list doesn't parse.
- The pack log says how many sponsors paid a listed price.
- The wizard's Options step offers the field when GitHub Sponsors is on.
- A refused tier field falls back to one month rather than failing.
@SimonCropp SimonCropp changed the title Recognise yearly one-time tiers on GitHub Sponsors Let an author declare which one-time GitHub payments buy a year Nov 29, 2026
@SimonCropp SimonCropp added this to the 0.29.0 milestone Nov 29, 2026
Base automatically changed from yearly-github-sponsors to main November 29, 2026 06:50
# Conflicts:
#	claude.md
#	src/SponsorCheck.Tests/Platforms/GitHubSponsorsPlatformTests.cs
#	src/SponsorCheck/Platforms/GitHubSponsorsPlatform.cs
@SimonCropp
SimonCropp merged commit 33e6fae into main Nov 29, 2026
5 checks passed
@SimonCropp
SimonCropp deleted the github-yearly-tiers branch November 29, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant