Conversation
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.
# Conflicts: # claude.md # src/SponsorCheck.Tests/Platforms/GitHubSponsorsPlatformTests.cs # src/SponsorCheck/Platforms/GitHubSponsorsPlatform.cs
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.
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
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.
tier.monthlyPriceInCentson 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.;-separated whole dollars, validated. A price that isn't a positive whole number fails the pack with the new SC110.;rather than,means1,200fails instead of reading as $1 and $200._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.tierfield leaves the payment at one month instead of failing the pack.Limits (documented in
AuthorSetup.md);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
GitHubYearlyPricesTests(parsing, canonical form, cents), a "Declared yearly prices" block inGitHubSponsorsPlatformTests(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 inBundleSponsorListTaskTests, the round trip inSharedFetchResultTests, andFetchSponsorListTaskTests.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) andYearlyPrices_ThatDoNotParse_FailThePackWithSC110.AuthorOptionsscreen snapshot is updated to show the field.