[go: up one dir, main page]

Skip to content

Automatically cc accounts on merge requests

Problem to solve

Some projects can be too large for everyone to know everything. In these projects, people usually end up focusing on smaller parts of the repo.

Further details

The Linux kernel has come up with a pretty good way of tracking this, using a file containing groups of (among other things) (files, people) pairs. It also uses a script that will automatically Cc: these people on patches emailed to the community.

Proposal

It would be great if GitLab gained the ability to understand this format, so that larger projects could automatically Cc: members to MRs.

  • When creating an MR, GitLab should parse a given file (filename should be set in the project settings as it is sometimes called MAINTAINERS and sometimes REVIEWERS), and find groups containing F: globs matching the files modified in this MR.
  • For each of those matching groups, there's a list of M: maintainers and/or R: reviewers which should be attached to the MR. These will usually be in the form Firstname Lastname <email@domain.tld> or just email@domain.tld.
  • For each of those names and/or emails, a match (by email, then by name if the email isn't the same one as registered on the account) should be attempted with accounts on the instance. Optionally, support for git's .mailmap should be added as well for better matching.

What does success look like, and how can we measure that?

  • If a matching account is found, it should be added to the MR as if it had been @username tagged.

Links / references