Skip to content

feat(projects): add optional parameter to set approval rule on all pr…#3374

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

feat(projects): add optional parameter to set approval rule on all pr…#3374
shehzadqureshi wants to merge 1 commit intopython-gitlab:mainfrom
shehzadqureshi:feat/approval-default-protect

Conversation

@shehzadqureshi
Copy link

@shehzadqureshi shehzadqureshi commented Mar 19, 2026

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. tox tests also pass locally.

Fixes #3372

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.

Add support for project approval rules applying to all default branches

1 participant