codeowners icon indicating copy to clipboard operation
codeowners copied to clipboard

Handling Gitlab-style "sections" for CODEOWNERS

Open c10r opened this issue 2 years ago • 1 comments

In Gitlab, CODEOWNERS files can have sections, where a single team is responsible for a bunch of files.

For example:

[Documentation] @docs-team
docs/
README.md

[Database] @database-team
model/db/
config/db/database-setup.md @docs-team
CleanShot 2023-06-04 at 14 51 07@2x

This project doesn't seem to support that. Would you be open to me adding a PR to add this support? There's no Contributing.md file, so wasn't sure if this was the best place to ask.

c10r avatar Jun 04 '23 21:06 c10r

As a temporary workaround, I just added the group to each line in the CODEOWNERS file:

[Documentation] @docs-team
docs/           @docs-team
README.md       @docs-team

[Database] @database-team
model/db/  @database-team
config/db/database-setup.md @docs-team

So it's not that big of an issue, just a nice to have.

c10r avatar Jun 04 '23 21:06 c10r