If your organizations default to push/write permissions, it is still required that a team have access to the repository explicitly in order for CODEOWNERS to recognize the team as a valid owner. To add teams with custom permissions, use the collaborators endpoint.
Note
This section can be applied to repos/<file>.yml or suborgs/<file>.yml. It will most commonly appear in the individual repos though.
# These settings are synced to GitHub by https://github.com/github/safe-settings
teams:
- name: JusticeLeague
permission: maintain
- name: Avengers
permission: maintainTip
GitHub's API documentation defines these inputs and types:
|
The slug of the team name. |
teams:
- name: JusticeLeague
permission: maintain
... |
|
The permission to grant the team on this repository. We accept the following permissions to be set: Default: |
teams:
- name: SuperFriends
permission: maintain |