Get pull request review protection
GET
/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews
repos
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.github.com/repos///branches//protection/required_pull_request_reviews'
响应示例响应示例
{
"dismiss_stale_reviews": true,
"dismissal_restrictions": {
"teams": [
{
"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"
}
],
"teams_url": "\"https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams\"",
"url": "\"https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions\"",
"users": [
{
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
}
],
"users_url": "\"https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users\""
},
"require_code_owner_reviews": true,
"required_approving_review_count": 2,
"url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions"
}
请求参数
Path 参数
owner
string
必需
repo
string
必需
branch
string
必需