2017-01-17 3 views
1

たとえば、次のプルリクエストがあります。https://github.com/harsh-groverfk/jenkins-demo/pull/16github apiを使用してプルリクエストを承認したユーザーを見つける方法を教えてください。

これらのプルリクエストの変更を「承認」したユーザーのリストを見つける方法。

これは、このプルリクエストの例のレビューです:あなたはList Reviews on a Pull Request API endpointを使用してこれを行うことができますhttps://github.com/harsh-groverfk/jenkins-demo/pull/16#pullrequestreview-16967726

答えて

4

。あなたがリストされてきた例のPRのために、これは次のようになります。

GET /repos/harsh-groverfk/jenkins-demo/pulls/16/reviewsまた

は、これがそう、それはAcceptヘッダー内のカスタムメディアタイプを必要preview-apiであることを忘れないでください、しかし、あなたはすべてを見つけることができますこの情報は提供されたリンクにあります。

application/vnd.github.black-cat-preview+json

すべての口コミをPR(ドキュメントからの例)で行われ、この意志出力:

[ 
    { 
    "id": 80, 
    "user": { 
     "login": "octocat", 
     "id": 1, 
     "avatar_url": "https://github.com/images/error/octocat_happy.gif", 
     "gravatar_id": "", 
     "url": "https://api.github.com/users/octocat", 
     "html_url": "https://github.com/octocat", 
     "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}", 
     "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", 
     "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", 
     "organizations_url": "https://api.github.com/users/octocat/orgs", 
     "repos_url": "https://api.github.com/users/octocat/repos", 
     "events_url": "https://api.github.com/users/octocat/events{/privacy}", 
     "received_events_url": "https://api.github.com/users/octocat/received_events", 
     "type": "User", 
     "site_admin": false 
    }, 
    "body": "Here is the body for the review.", 
    "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", 
    "state": "APPROVED", 
    "html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80", 
    "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/12", 
    "_links": { 
     "html": { 
     "href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80" 
     }, 
     "pull_request": { 
     "href": "https://api.github.com/repos/octocat/Hello-World/pulls/12" 
     } 
    } 
    } 
] 
関連する問題