Add type SponsorshipEvent#3258
Add type SponsorshipEvent#3258gmlewis merged 8 commits intogoogle:masterfrom DiegoDev2:add-sponsorship-event-type
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.
|
Force the push? Oh sorry I didn't notice. |
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.) |
|
I did a normal git push, I don't know what happened, I'm sorry |
Once again, please read step 4 of CONTRIBUTING.md. Specifically,
|
|
That's what I'm trying right now, but when I do I get this: ./script/fmt.sh |
|
OK, then just try |
|
And if that fails, then please try |
|
That's it, some dependencies were downloaded, After that and excuse me. First time I contribute to the |
|
Excuse me for bothering you so much, is there something missing to solve it? |
|
Once you run Then, you can commit the changes, push to this PR, and the tests should all pass. |
|
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
|
I already did👍🏻 |
|
Was it done again as Git Push --forze? Because I did a normal git push? |
|
Hello good evening, an apology I had to leave. I'm already working on it |
|
Still not sorted. Please try again. |
|
AAAA |
|
I'm sorry, I don't know what to do anymore. |
|
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.
|
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