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": "pull"
}'
{}
Authorization: Bearer ********************
pull
- team members can pull, but not push to or administer this repository.push
- team members can pull and push, but not administer this repository.admin
- team members can pull, push and administer this repository.maintain
- team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations.triage
- team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations.permission
attribute will be used to determine what permission to grant the team on this repository.【GitHub】API开发者 微信交流群
用微信扫右侧二维码,加入【GitHub】API开发者 交流群,互助沟通