Autopopulate CODEOWNERS from git history
Summary
In the 13.4 retrospective it was discussed that it can be hard to find experts for areas of the codebase that don't have ownership by a single group.
As a solution to this we'd like to iterate on the CODEOWNERS file in the gitlab-org/gitlab project so that reviewers and codeowners suggested by the UI are suggested with greater resolution.
Proposal
There are a number of ways we can approach this:
- Use
git blameandgit historyto build a profile of recent collaborators for each file in the repository; - Map from stages and groups in the handbook;
- Ask team-members to self-elect.
We're exploring the first action. (2) is likely to be more work and doesn't solve the problem (it's precisely areas of the code that don't have clear ownership that are the problem). (3) is likely to be inefficient and lead to an incomplete result.
(1) Could be automated so that it can be run on a regular basis, to ensure the data is fresh.
Edited by John Hope