Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab
GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 35,920
    • Issues 35,920
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 1,286
    • Merge Requests 1,286
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #4413

Closed
Open
Opened Dec 21, 2017 by Reb@xyzzy🥓Developer

MR approvers and branch permission based on repo path - code owners

Description

Allow administrators to define MR approvers and/or protected branch permissions based on repo paths. Large organizations with thousands of repos need to be able to configure them programmatically. To do so by hand is unmanageable.

Customer requests the ability to set the policy of who should review merge requests (or perhaps push to a branch) based on paths.

  • This is needed at project setup time to...
    • Automate setup of MR approvers
    • Enforce sensible defaults
    • Allow users to self-service creation of projects with less administrative assistance

GitHub has a similar feature called "Code owners"

Currently there is no GitLab API setting for configuration MR approvals that would allow any of this to be able to be done via a web hook. While that approach might work, the method defined here is seen as being far superior.

Proposal

Use a file or files, similar to how templates are implemented, to allow MR and branch permissions to be defined based on repository paths.

  • When a project gets created add the containing group to the default set of permissions.
  • Fallback (default) should be configurable such that permission is granted to a pre-defined group.

Links / references

https://github.com/blog/2392-introducing-code-owners https://gitlab.com/gitlab-org/gitlab-ee/issues/2962 https://gitlab.com/gitlab-org/gitlab-ee/issues/183

/vv: @victorwu

Edited Dec 21, 2017 by Reb
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: gitlab-org/gitlab#4413