Type | Description |
---|---|
array | The teams that can have push access. Use the team's slug . Note: The list of users, apps, and teams in total is limited to 100 items. |
curl --location --request POST 'https://api.github.com/repos///branches//protection/restrictions/teams' \
--header 'Content-Type: application/json' \
--data-raw '{
"teams": [
"my-team"
]
}'
[
{
"description": "string",
"html_url": "https://github.com/orgs/rails/teams/core",
"id": 0,
"members_url": "string",
"name": "string",
"node_id": "string",
"parent": {
"description": "A great team.",
"html_url": "https://github.com/orgs/rails/teams/core",
"id": 1,
"ldap_dn": "uid=example,ou=users,dc=github,dc=com",
"members_url": "https://api.github.com/organizations/1/team/1/members{/member}",
"name": "Justice League",
"node_id": "MDQ6VGVhbTE=",
"permission": "admin",
"privacy": "closed",
"repositories_url": "https://api.github.com/organizations/1/team/1/repos",
"slug": "justice-league",
"url": "https://api.github.com/organizations/1/team/1"
},
"permission": "string",
"privacy": "string",
"repositories_url": "http://example.com",
"slug": "string",
"url": "http://example.com"
}
]
Authorization: Bearer ********************
【GitHub】API开发者 微信交流群
用微信扫右侧二维码,加入【GitHub】API开发者 交流群,互助沟通