Map 'Require review from Code Owners' GitHub rule with GitLab setting
What does this MR do and why?
When importing project from GitHub we import branch protection rules al well. Here we import Require a pull request before merging
- Require review from Code Owners
GitHub rule and map it to Code owner approval
GitLab rule (on Premium and Ultimate GL). If the imported protected branch is also protected on GitLab, we will apply the strictest rule.
It solves Require code owner approval.
Screenshots or screen recordings
import-Require-review-from-Code-Owners-rule
How to set up and validate locally
- Have a project on GitHub
- On GitHub create a protection rule with
Require a pull request before merging
-Require review from Code Owners
enabled for any branch - Import the project from GitHub to GitLab
- Go to project -> Settings -> Repository -> expand Protected branches section
- Ensure the same branch is protected on GitLab with such setting:
-
Code owner approval
- Enabled
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Tetiana Zavediuk