Exclude branches from webhook triggers.
Problem to solve
I was sent here by one of your support engineers.
Currently it is not possible to exclude branches from webhook triggers.
Proposal
Only trigger a webhook when merge request is created or push to branch other than main
.
Under webhook configuration: Trigger / Push Events - add a way to exclude branches. For example !main
.
Intended users
Devops.
Example:
- If branch other than
main
is created trigger a webhooktest
. - If
merge request
is created trigger a webhooktest
. - If Push to
main
trigger a webhookdeploy to dev
.
Workaround
Current workarounds:
- gitlab CI with shell scripts
- GCP Cloud Build with shell scripts
- GCP Cloud Build with filters
Edited by Adam Grzesiczak