Skip to content

Scope approval rules by protected branches via API

What does this MR do?

Updates API endpoints for creating and updating project-level approval rules to support a new protected_branch_ids param (an array of IDs).

When this param is set, the ProtectedBranch records matching those IDs will be associated to the ApprovalProjectRule created/updated.

Rules that have associated ProtectedBranch records will only apply to MergeRequests with a target_branch that matches the protected branch rules.

Documentation MR: !22754 (merged).

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

#460 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports