Skip to content

GitLab Next

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 43,023
    • Issues 43,023
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,339
    • Merge requests 1,339
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #5382
Closed (moved) (moved)
Open
Created Mar 21, 2018 by James Ramsay (ex-GitLab)@jramsay-gitlab🔴Contributor

Suggest approvers based on code owners

A code owners file provides a version controlled way of documenting which groups or individuals are key stakeholders in specific areas of the codebase. These people are likely to be the best people to request a code review from and would likely make the best approvers.

Suggesting approvers when opening or editing a merge request is useful to open and flexible teams that do not want to impose rigid workflows, but want to document whom are the best people to request code reviews from.

We should build a simple suggestion based code owners feature, and then incrementally add levels of enforcement for stricter teams.

Proposal

Extending the first iteration https://gitlab.com/gitlab-org/gitlab-ee/issues/6961, when creating or editing a merge request, it should:

  • Check the target branch (frequently master) the presence of a CODEOWNERS file in the root directory
  • Evaluate the list of changed files against the CODEOWNERS file to generate the list of users to be notified
  • The Suggested approvers list in the Edit merge request interface should show the list of users generated above
    • If no CODEOWNERS rules match, either because there is no CODEOWNERS file or no rules that match the changed files, fallback to the existing git log approach.
    • If a CODEOWNER is not an eligible approver still show them in the list but disabled and with a tooltip explaining they are not an eligible approver.

20180718_screenshot_1

Links

https://help.github.com/articles/about-codeowners/

Customers

https://gitlab.my.salesforce.com/00161000002xBfL

Edited Dec 08, 2020 by 🤖 GitLab Bot 🤖
Assignee
Assign to
Time tracking