Filter push events by branch
Web hooks are a great way to integrate different systems, but many external systems provide no way to filter the incoming events. It would be helpful in these situations to be able to filter web hooks by branch so that I can listen to only webhooks from the important branches, not every feature branches I am uninterested in.
Just a feature that I'd find useful: I have a web hook that is triggered on Push events, however I only want it to be triggered for pushes to a specific branch(s). When creating a webhook, it could be possible to select the branches where the webhook would be triggered.
Perhaps even having some kind of regex matching so that for instance, all branches following
feature/* would trigger a certain webhook.
I have found gitlabhq/gitlabhq/issues/1176, but there was no answer at the time.
For the first iteration, this feature can be limited to push events.
- ability to specify a branch name in a form field under "Push events" when configuring a web hook
- logic to respect this branch name restriction, so that when a branch name is configured, only pushes to that branch result in a web hook being triggered
- ability to set and get this value using the API
- support for branch patterns with wildcards (
*), like we do with protected branches.
In a future iteration, we can add similar functionality for Tag push, Job, Pipeline, and Merge request events.