Skip to content

Resolve "Scope merge request approval rules to protected branches"

Samantha Ming requested to merge 460-approval-rules-protected-branch-fe into master

Issue: #460 (closed)

What does this MR do?

Add the ability to scope merge request approval rules to protected branches.

Testing Case

Note: this feature is only for users that allow multi rules. In other words, premium & ultimate license only. When testing, please make sure you are using the ultimate license. To do that, please go to "Admin Area" and upload the ultimate license key. Instructions

Note 2: this feature is only applicable for protected branches. You may or may not need to do this depending on if you have some protected branches in the project already. Settings > Repository > Expand Protected Branches. Add some branches to be protected. Instructions

Add approval rule

  1. Go to the Project Settings Page > Expand Merge request approvals
  2. Click on "Add approval rule"
  • It should have the new "Target Branch" field:
default dropdown selected
image image
  1. Please fill and select a branch that is not "Any branch"
  2. Also try typing in the search field & make sure it's working
  3. Click on the "Add approval rule"

Merge request approvals

  1. In the Merge request approvals section
  • It should have the Target branch column

image

Edit approval rule

  1. In the Merge request approvals section
  2. Click on the "Edit" button
  • It should have the new "Target Branch" field:
default dropdown selected
image image

Where this feature doesn't exist

You should not see this feature existing in these 2 other scenarios

Starter License

Please use the starter license to make sure this

  1. Navigate to the project settings page
  • You should see this (no target branch)
Rule No Rule
image image
  1. Click on "edit" next to a rule or click "Add approval rule"
  • You should see this (no target branch selection)

image

MR edit page

  1. Navigate to an MR page
  2. Click the "edit" button
  • You should see this (no target branch)

image

  1. Click on "edit" next to a rule or click "Add approval rule"
  • You should see this (no target branch selection)

image

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

Closes #460 (closed)

Edited by Gary Holtz

Merge request reports