Allow more fine grained configuration of webhooks
We can add webhooks for a list of defined events.
https://docs.gitlab.com/ce/user/project/integrations/webhooks.html
Sometimes, we may only care about one specific property returned by that event. For example, if we want to post all ~Frontend regression issues to a Slack channel, we only care about the label of any issue being updated. We don't care if the assignee changes, for example. Without being able to know whether just the label changed or not, you would have to have your own persistence layer of some kind to check if you already posted an issue before sending it to slack.
My proposal is to add checkboxes under each of these event types to allow you to finely control what the event will be fired for.
Using the example above, we could create a new Issue events
webhook, that unselects every property apart from label. Then, that event will only fire when the label of an issue updates.
However, we still have the problem that an issue labeled ~Frontend regression ~Documentation that is then relabelled to ~Frontend regression ~Build would still be posted to slack twice. Therefore, we would also need a Unique only
option that would only fire the event if that resource hasn't already been sent previously. I moved this proposal to a new issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/31489
Maybe this is all too much and its actually down to the consumer to have a persistence layer if they want this level of configuration?
/shrug