Uh oh!
There was an error while loading. Please reload this page.
Add type SponsorshipEvent - #3258
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## master #3258 +/- ##
==========================================
- Coverage 97.72% 92.94% -4.78%
==========================================
Files 153 171 +18 Lines 13390 11663 -1727 ==========================================
- Hits 13085 10840 -2245 - Misses 215 729 +514 - Partials 90 94 +4 ☔ View full report in Codecov by Sentry. |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @CodeDiego15 !
Please read step 4 of CONTRIBUTING.md and push (not force-push) the resulting changes to this PR.
DiegoDev2
commented
Sep 8, 2024
Force the push? Oh sorry I didn't notice. |
gmlewis
commented
Sep 8, 2024
No. Please push the results. (Not a big deal, but please do NOT use force push in this repo, as explained in CONTRIBUTING.md, as we always use squash and merge in this repo.) |
DiegoDev2
commented
Sep 8, 2024
I did a normal git push, I don't know what happened, I'm sorry |
gmlewis
commented
Sep 8, 2024
Once again, please read step 4 of CONTRIBUTING.md. Specifically,
|
DiegoDev2
commented
Sep 8, 2024
That's what I'm trying right now, but when I do I get this: ./script/fmt.sh |
gmlewis
commented
Sep 8, 2024
OK, then just try |
gmlewis
commented
Sep 8, 2024
And if that fails, then please try |
DiegoDev2
commented
Sep 8, 2024
That's it, some dependencies were downloaded, After that and excuse me. First time I contribute to the |
DiegoDev2
commented
Sep 8, 2024
Excuse me for bothering you so much, is there something missing to solve it? |
gmlewis
commented
Sep 8, 2024
Once you run Then, you can commit the changes, push to this PR, and the tests should all pass. |
gmlewis
commented
Sep 8, 2024
For example: go generate ./...
git commit -sam 'run step 4'
git push origin add-sponsorship-event-type |
Signed-off-by: CodeDiego15 <andrebermudezdiego@gmail.com>
…iego15/go-github into add-sponsorship-event-type
DiegoDev2
commented
Sep 8, 2024
I already did👍🏻 |
DiegoDev2
commented
Sep 8, 2024
Was it done again as Git Push --forze? Because I did a normal git push? |
DiegoDev2
commented
Sep 9, 2024
Hello good evening, an apology I had to leave. I'm already working on it |
Uh oh!
There was an error while loading. Please reload this page.
gmlewis
commented
Sep 9, 2024
Still not sorted. Please try again. |
DiegoDev2
commented
Sep 9, 2024
AAAA |
DiegoDev2
commented
Sep 10, 2024
I'm sorry, I don't know what to do anymore. |
gmlewis
commented
Sep 10, 2024
No problem. I'll take over from here. Thanks. |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @CodeDiego15 !
LGTM.
Merging.
DiegoDev2
commented
Sep 10, 2024
Thank you very much for accepting the PR will probably contribute to more issues. |


Description
This pull request adds support for the
SponsorshipEventto the go-github library, addressing the issue described in #2982.Details
According to GitHub documentation (SponsorshipEvent), the
SponsorshipEventis triggered when sponsorship changes occur, such as creation, cancellation, or tier changes.This PR introduces the following changes:
New
SponsorshipEventstruct: Captures the key properties of a sponsorship event, including:Action: The type of action performed (e.g.,created,tier_changed,cancelled, etc.).EffectiveDate: The date when the event or change becomes effective, applicable for events likepending_cancellationandpending_tier_change.Changes: An optional field that captures details about changes, such as adjustments in sponsorship tier or privacy. This is represented by an embedded struct calledSponsorshipChanges.Repository,Organization,Sender, andInstallationare also included to maintain consistency with other GitHub event types.New
SponsorshipChangesstruct: This struct provides additional details when thetierorprivacy_levelof a sponsorship is modified.Tierfield captures tier changes using an embeddedSponsorshipTierstruct, which contains aFromfield representing the previous tier.PrivacyLevelfield tracks any changes to the sponsorship’s privacy settings.This new event type will allow go-github users to programmatically handle sponsorship-related events triggered on GitHub, improving support for GitHub Sponsors workflows.
Testing
SponsorshipEventstruct from JSON payloads.Issue Link
Resolves#2982