422 Unprocessable Entity
status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set Content-Length
to zero when calling out to this endpoint. For more information, see "HTTP verbs."org_id
and team_id
using the route PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}
.curl --location --request PUT 'https://api.github.com/orgs//teams//repos//' \
--header 'Content-Type: application/json' \
--data-raw '{
"permission": "push"
}'
{}
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.