Map CODEOWNERS sections to Danger categories
Why
To better rely on product features (CODEOWNERS) than customized Danger categories. Basically Dogfooding.
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)