Skip to content

feat(approvals): add support for applying project approval rules to all protected branches#3373

Closed
shehzadqureshi wants to merge 1 commit intopython-gitlab:mainfrom
shehzadqureshi:feat/approval-default-protect
Closed

feat(approvals): add support for applying project approval rules to all protected branches#3373
shehzadqureshi wants to merge 1 commit intopython-gitlab:mainfrom
shehzadqureshi:feat/approval-default-protect

Conversation

@shehzadqureshi
Copy link

Changes

Adds a parameter applies_to_all_protected_branches to project approval rule, that allows us to apply approval rules to all protected branches rather than enumerating the branches.

This is a documented feature in the API: https://docs.gitlab.com/api/merge_request_approvals/#create-an-approval-rule-for-a-project

Documentation and testing

I tested this by building a local docker container and executing it against my Gitlab Premium/Ultimate self-hosted service.

@shehzadqureshi shehzadqureshi deleted the feat/approval-default-protect branch March 19, 2026 21:29
@shehzadqureshi shehzadqureshi restored the feat/approval-default-protect branch March 19, 2026 21:30
@shehzadqureshi shehzadqureshi deleted the feat/approval-default-protect branch March 19, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant