Question: Add team for CODEOWNERS from other organization


In documentation there is information that teams can be assigned in CODEOWNERS file.

(..) or team names using the standard @username or @org/team-name.

as we can see there is format @org/team-name. That means that I can assign team from different organization?

Example, org Foo has only team definition:

Org: Foo

Teams: A,B,C

Org Bar has only repos with teams codeowners from Foo organization

Org: Bar

Repository:  XYZ: with CODEOWNERS:

# Files owned by team from Foo organization
*.go @Foo/A

Thanks in advance for your reply :) 



1 Like

Thank you @mszostok for being here and for your excellent question!  Although @org/team-name is apart of the permitted syntax for adding CODEOWNERS, teams are per organization and code owners are per repository.  So there is presently no cross-over in allowing CODEOWNER access from one organization’s team to another organization using that assigning syntax.

You would need to configure a team per organization to encompass the users that you wish to have as CODEOWNER per repository.