0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-19 16:31:41 +01:00
gitea/modules/notification
James Lakin 6fc129fe62
Fix repository create/delete event webhooks (#13008)
This small PR changes the webhook trigger behaviour to be more in line with what's expected. (When 'repository' events are enabled, of course)

In other words:

For system-wide or default webhooks, repository events will now trigger said webhook. Previously it had to be under an organization for create events to be visible - a tad unexpected!
Deleting a repository will now fire its own defined webhooks, not just organisational and system ones.
In order to enable the latter the webhook has to now be triggered before the actual repo undergoes deletion. I'm willing to tweak this to try and 'grab' the webhook model beforehand and trigger the webhook notifier directly afterwards, but this may make the code more complex for little benefit.

Closes #11766, #9180.
2020-10-02 10:37:46 +01:00
..
action Fix panic when adding long comment (#12892) 2020-09-18 13:50:06 -04:00
base Change/remove a branch of an open issue (#9080) 2020-09-08 12:29:51 -04:00
indexer Change/remove a branch of an open issue (#9080) 2020-09-08 12:29:51 -04:00
mail Add email notify for new release (#12463) 2020-08-23 16:03:18 +01:00
ui Add push commits history comment on PR time-line (#11167) 2020-05-20 09:47:24 -03:00
webhook Fix repository create/delete event webhooks (#13008) 2020-10-02 10:37:46 +01:00
notification.go Change/remove a branch of an open issue (#9080) 2020-09-08 12:29:51 -04:00