Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Split CODEOWNERS to better identify actual code owners #11236

Closed
Swiddis opened this issue Nov 16, 2023 · 2 comments
Closed

[FEATURE] Split CODEOWNERS to better identify actual code owners #11236

Swiddis opened this issue Nov 16, 2023 · 2 comments
Labels
enhancement Enhancement or improvement to existing feature or request untriaged

Comments

@Swiddis
Copy link

Swiddis commented Nov 16, 2023

This is a copy of opensearch-project/dashboards-observability#1252. I originally wrote this for my own team but after looking around the other repos and investigating some longstanding PRs, I think it would be worth investigating how we could improve this across the board.

Is your feature request related to a problem?
The current CODEOWNERS file marks every maintainer as an owner of the entire codebase. The issue is that code owners are automatically added as reviewers to PRs that touch owned code, which in practice means that every maintainer is assigned as a reviewer on every PR. This makes the review notifications very noisy and makes it harder to identify PRs where a specific maintainer is actually needed.

What solution would you like?
CODEOWNERS turns out to be capable of much more than a global mask, though. It supports gitignore-like syntax to assign owners to individual files. By making better use of this file, we can get PRs to the people that need to see them, faster.

It also can just reference our teams directly instead of listing every dev, which has the benefit of better dynamic management and also would help make the review process less noisy.

What alternatives have you considered?
There are a few other approaches to the issue.

  • We could just disable automatically adding code owners in the repository review settings, making the process manual. I think this would still be better than adding everyone automatically.
  • We could use a more elaborate system like assign-reviewer-by-label to implement this functionality through PR labels instead of CODEOWNERS.

Do you have any additional context?
This type of strategy is put to good use in some large projects like CPython and Node.js. I especially like Node's three rules that they clarify at the top of their file.

@Swiddis Swiddis added enhancement Enhancement or improvement to existing feature or request untriaged labels Nov 16, 2023
@Swiddis
Copy link
Author

Swiddis commented Nov 16, 2023

Also just was informed of #10613 in the other issue, there's more discussion there.

@Swiddis
Copy link
Author

Swiddis commented Nov 16, 2023

Closing in favor of #10613

@Swiddis Swiddis closed this as completed Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request untriaged
Projects
None yet
Development

No branches or pull requests

1 participant