Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 1.93 KB

File metadata and controls

52 lines (41 loc) · 1.93 KB

Configuring team permissions

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.

Example team definition

# These settings are synced to GitHub by https://github.com/github/safe-settings
teams:
  - name: JusticeLeague
    permission: maintain
  - name: Avengers
    permission: maintain

Team API Spec

Tip

GitHub's API documentation defines these inputs and types:

  1. Add or update team repository permissions

namestring${\text{\color{orange}Required}}$

The slug of the team name.

teams:
  - name: JusticeLeague
    permission: maintain
...

permissionstring

The permission to grant the team on this repository. We accept the following permissions to be set: pull, triage, push, maintain, admin and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.

Default: push

teams:
  - name: SuperFriends
    permission: maintain