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

Unable to specify multiple teams as owners #111

Open
MrLukeSmith opened this issue Nov 22, 2024 · 2 comments
Open

Unable to specify multiple teams as owners #111

MrLukeSmith opened this issue Nov 22, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@MrLukeSmith
Copy link

The syntax for CODEOWNERS, as described by GitHub, permits multiple owners.

E.g.

/scripts/ @doctocat @octocat

code_ownership doesn't appear to support this (I've tried lots of permutations, none work. Documentation only ever references team in the singular). It'd be great if it were able to accept a comma separated string, one per line for the file type, or something like that 🤷. Allowing us to define multiple teams as owners of areas.

# .codeowner
Team One, Team Two

or

# @team Team One, Team Two
@github-actions github-actions bot added the triage A new issue that needs review by the core team label Nov 22, 2024
@frostevent
Copy link

+1

It would be nice to allow a file to be owned by different teams.

For example team1.yml:

name: Team1
owned_globs:
 - app/services/users/**/*

and team2.yml:

name: Team2
owned_globs:
 - app/services/users/send_notification.rb

would result in:

app/services/users/**/* @Team1
app/services/users/send_notification.rb @Team2

It's particularly useful when trying to break apart a monolith. Team1 owns most of app/services/users/ while Team2 owns send_notification.rb, but Team2 hasn't moved the file elsewhere yet because either it still contains code Team1 owns or it doesn't have another home yet. Both teams are still interested in changes to that file.

@ashleywillard
Copy link
Contributor

Hi @MrLukeSmith and @frostevent! Please see this issue from February on the same topic: #86

If you want to pursue this functionality in a way that is opt-in, we're open to review it. We'd like to be able to continue to require one owner per file, but having an option to change that setting would be fine. Alex wrote:

"Typically I've dealt with that by finding ways to improve the boundaries/responsibility of the file. The tool as originally designed was meant to be opinionated such that mega-files with too much responsibility go against the grain a bit.

The benefit of this is the tool becomes a lot easier to maintain and use in a lot of ways, although might be interesting to support it as an isolated experiment to better understand how it affects the structure and usage of the tool!"

@ashleywillard ashleywillard added enhancement New feature or request and removed triage A new issue that needs review by the core team labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants