Skip to content

Frontend Implementation of Code Owner Approval

Samantha Ming requested to merge 13251-fe-require-approval-from-code-owners into master

Issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/13251

CE port: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/32845

What does this MR do?

Add Code Owners Approval toggle options to Protect a branch form and Protected branch table.

Form

image

Table

image

Note

This feature is only available if the merge request approval settings "require approval from code owners"

image

Test Case

Code Owner Approval option is only available if Merge request approvals has "require approval from code owners" checked

Check "Require approval from code owners"

Uncheck "Require approval from code owners"

Form Create a new Protected Branch with the correct Code Owner Approval state

Create a Protect a branch by filling out the form:

  • Branch > Select a branch
  • Allowed to merge > Select "Maintainers"
  • Allowed to push > Select "No one"
  • Require approval from code owners > Toggle true
  • The new protected branch has "true" state of Code Owner Approval

Create another Protect a branch:

  • Require approval from code owners > Toggle false
  • The new protected branch has "false" state of Code Owner Approval

Editing the Protected Branch saves state after refresh

In the Code Owner approval table

  • Toggle it to false
  • Refresh page
  • the state is false
  • Toggle it to true
  • Refresh page
  • the state is true

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Performance 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 #13251 (closed)

Edited by Samantha Ming

Merge request reports