go-github icon indicating copy to clipboard operation
go-github copied to clipboard

Add EventType consts representing the X-Github-Event header values

Open MaerF0x0 opened this issue 1 year ago • 4 comments

What: Adds type EventType string and an EventType const for every of the types in the maps in github/messages.go

Why: So that we can do switches like

switch eventType {
    case github.EventTypeFork:
        // do stuff
     case github.EventTypeDiscussionComment, github.EventTypeIssueComment:
        // do something with either
}

Notes:

  • It should be non-breaking change
  • Let me know if you want the EventType used more widely including implementing type EventTyper interface{} on each of those structs

MaerF0x0 avatar Sep 19 '24 05:09 MaerF0x0

Also, please make sure all tests run locally by following step 4 of CONTRIBUTING.md and push any necessary changes to this PR.

gmlewis avatar Sep 19 '24 13:09 gmlewis

Also, please resolve all conflicts and push (not force-push) the changes to this PR. Thank you!

gmlewis avatar Oct 03 '24 20:10 gmlewis

@gmlewis Thanks for the updates. I will be able to get to this in the later half of October. Just wanted you to know I haven't forgotten about, or abandoned this :)

MaerF0x0 avatar Oct 03 '24 23:10 MaerF0x0

@gmlewis Thanks for the updates. I will be able to get to this in the later half of October. Just wanted you to know I haven't forgotten about, or abandoned this :)

Awesome! Thank you, @MaerF0x0, for the update! No problem. We'll keep the PR open.

gmlewis avatar Oct 03 '24 23:10 gmlewis

@gmlewis I rebased my branch on origin/master so it required a force push.

fixed broken test in 4aa32d2d

MaerF0x0 avatar Oct 26 '24 02:10 MaerF0x0

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.01%. Comparing base (2b8c7fa) to head (4aa32d2). Report is 244 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3272      +/-   ##
==========================================
- Coverage   97.72%   93.01%   -4.71%     
==========================================
  Files         153      172      +19     
  Lines       13390    14848    +1458     
==========================================
+ Hits        13085    13811     +726     
- Misses        215      944     +729     
- Partials       90       93       +3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 26 '24 11:10 codecov[bot]

I will close this PR around the end of January, 2025 as "abandoned" if there is no further response.

gmlewis avatar Jan 22 '25 01:01 gmlewis

Closing PR as abandoned.

gmlewis avatar Feb 05 '25 14:02 gmlewis