Esc
# JiHu GitLab MR Code Owners Rules https://jihulab.com/gitlab-cn/gitlab/-/issues/2791 ---  ---  --- https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117020/diffs ```yaml # .gitlab/CODEOWNERS [JH Frontend] @jihulab/maintainers/frontend /jh/app/assets/ /jh/**/*.scss /jh/**/*.js /jh/**/*.vue [JH Rails Backend] @jihulab/maintainers/rails-backend /jh/**/*.rb /jh/**/*.rake /jh/qa/ @jihulab/maintainers/quality [JH Technical Writer] @jihulab/maintainers/technical-writer /jh/doc/ ``` --- ```md https://jihulab.com/jihulab/maintainers/frontend @qk44077907 @jeremywu @lxwan @orozot https://jihulab.com/jihulab/maintainers/rails-backend @zhanglinjie @lyb124553153 @icbd @luzhiyuan.deer @songhuang @zhzhang https://jihulab.com/jihulab/maintainers/quality @TomHeng @leiqi_jihulab https://jihulab.com/jihulab/maintainers/technical-writer @zhaoqi @shuangzhang ``` --- ## Setup - Project with Premium Feature - Add rules to `CODEOWNERS` file - Create groups and assign roles (`Developer` at least) - Invite groups to the project - Protected branches: Turn on the `Require approval from code owners` toggle - Configure `All eligible users` approval rule ---  --- ## Ref Doc - https://docs.gitlab.com/ee/user/project/codeowners/index.html - https://docs.gitlab.com/ee/user/project/protected_branches.html#require-code-owner-approval-on-a-protected-branch - https://docs.gitlab.com/ee/user/project/merge_requests/approvals/rules.html#code-owners-as-eligible-approvers