-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Granular webhook events #9626
Granular webhook events #9626
Conversation
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #9626 +/- ##
=========================================
- Coverage 43.65% 43.6% -0.05%
=========================================
Files 587 588 +1
Lines 82254 82474 +220
=========================================
+ Hits 35905 35963 +58
- Misses 41889 42048 +159
- Partials 4460 4463 +3
Continue to review full report at Codecov.
|
Maybe the bug could be backport to v1.11 |
I will extract the bug and make a new PR for it. |
@jolheiser for the CI or any other server will receive the webhook. The types changed, it may affect them. So I think it's a break. |
Aha, okay that makes sense. |
Maybe also split branch/tag creation/deletion? |
Also it could be better to not make it breaking change by just sending hook type as it is currently so for example: |
@lafriks Regarding hook types, they are just string types, so having multiple be the same would not work. The workaround I have found so far is to convert them back into generic types when the final payload is created, but I'm not sure I really like that implementation since it's just another place to check in the future to make sure webhooks don't break. Or did you have some thoughts on the matter? There's a good chance I'm over thinking it. 😅 |
Yes, tag/branch event splitting can be done in other PR, I was just thinking this could be added here if it is easy to add. Most probably hook types can be changed to enum and than have function that would return hook type string to send based on that enum |
Sounds good, I'll see what the effort looks like after splitting into enums.
That's a great idea. I think that should be doable, will give it a try. Side-note, this PR can have the |
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
I know this has |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the api should be cleanded if v2 ... but for now ok
please resolve conflicts |
🙌 |
Really nice addition @jolheiser, nicely done |
This PR splits out webhook events to give users more control over when to notify via webhooks.