You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GHEvent enum is missing branch_protection_rule #1297
Describe the bug
We are seeing this issue when Jenkins is receiving a branch_protection_rule webhook event, which is rejected with error "Error 400 Hook should contain event type"
Drilling down to this piece of code, seems branch_protection_rule is missing from GHEvents enum.
Expected behavior
No error 400 is returned when receiving a GitHub branch_protection_rule event
Additional context
I can provide corresponding PR, just would need some guidance reg. scope of the change.
Is it only a matter of adding BRANCH_PROTECTION_RULE into GHEvent?
Activity
gsmet commentedon Nov 16, 2021
So yes, you need to add the entry to GHEvent and update the test here: https://github.com/hub4j/github-api/blob/main/src/test/java/org/kohsuke/github/EnumTest.java#L31 .
Ideally, you could also implement the payload here: https://github.com/hub4j/github-api/blob/main/src/main/java/org/kohsuke/github/GHEventPayload.java so that we have everything needed to handle the event in Java.