Include ref_protected field in pipeline webhook events
We rely on GitLab webhook events to automate various tasks outside of the CI/CD pipelines. In particular, we use pipeline events to trigger external processes based on pipeline status and context.
Problem
When receiving a Pipeline Hook, we currently don’t have any information indicating whether the pipeline is running on a protected branch or tag.
However, we’ve noticed that push events do include this field:
"ref_protected": false
This is critical for us, as some of our automation logic needs to behave differently depending on whether the pipeline runs on a protected ref.
Feature Request
We would like the ref_protected field to be included in the payload of pipeline webhook events, just like it is for push events.
Benefits
- Consistency across webhook event types (
pushandpipeline) - Enables more secure and accurate external automation
- Avoids additional API calls or permission checks on our side to infer protection status
Thanks
Edited by 🤖 GitLab Bot 🤖