Migrate group GitLab project approval to Codeowners
Objective
Dogfood codeowners on gitlab-org/gitlab
by migrating specific code approvals from Danger to optional codeowners.
Problem statement
Reviewer roulette and Danger is getting expanded to indicate required reviews usually with a label workflow to signal approval (ie. databaseapproved product intelligenceapproved and gitlab-org/gitlab#341703 (comment 697798823).
By using Codeowners with optional approvals for non-required changes we can move away from custom tooling towards the native product features and move away from a label based workflow.
Considerations
- Optional Codeowners can help roll this out iteratively
- Making the owning group (ie Database Approvers, Product Intelligence, Integrations team, Engineering Productivity, SETs?) aware of the MRs may require tooling (triage-reactive?)
- Adding required Codeowner approval rules to a project will require approvals for all MRs in progress: gitlab-org/gitlab#349495 (comment 857355981)
Proposal
-
Set all current Codeowners rules to optional to work around gitlab-org/gitlab#349495 (closed) => gitlab-org/gitlab!83666 (merged) - Tasks were created for the remaining work
Description from gitlab-org/ruby/gems/gitlab-dangerfiles#77 (closed) below
What
We are categorizing files both in CODEOWNERS categorized by sections, and also in Danger categorized by CATEGORIES
in tooling/danger/project_helper.rb
In order to reuse CODEOWNERS as much as possible, we can try to stop using CATEGORIES
and use the sections as the categories for Danger.
How
We have sections called Backend
and Frontend
which can be mapped to :backend
and :frontend
respectively easily. We also have Pipeline configuration
section which we can probably map it to :pipeline
by using the first word. Or we can just rename the section.
If we couldn't find an easy way to map, we can also consider creating the manual mapping directly somewhere, potentially in tooling/danger/project_helper.rb
with another constant.
Background
See this discussion: gitlab-org/gitlab!135598 (comment 1636683011)