使用API获取GitHub私有存储库的Pull请求审阅注释
我想获取为GitHub存储库提出的所有Pull请求的审阅注释。它是一个企业GitHub和私有存储库。 例如:使用API获取GitHub私有存储库的Pull请求审阅注释,github,github-api,Github,Github Api,我想获取为GitHub存储库提出的所有Pull请求的审阅注释。它是一个企业GitHub和私有存储库。 例如: github的URL是 回购协议的URL为 如何使用GitHub API获取所有提出的PRs的所有审查意见。该API有一个端点: 使用以下旋度可以获得回购的所有拉力: curl -H "Authorization: token PERSONALACCESSTOKEN" -get https://GHEURL/api/v3/repos/REPOOWNER/REPO/pulls?stat
- github的URL是
- 回购协议的URL为
如何使用GitHub API获取所有提出的PRs的所有审查意见。该API有一个端点: 使用以下旋度可以获得回购的所有拉力:
curl -H "Authorization: token PERSONALACCESSTOKEN" -get https://GHEURL/api/v3/repos/REPOOWNER/REPO/pulls?state=all
因此,从示例URL来看,这将是
curl -H "Authorization: token PERSONALACCESSTOKEN" -get https://github.mycomp.com/api/v3/repos/MyRepo/MyProject/pulls?state=all
一旦您有了拉取列表,您将需要找到您感兴趣的拉取,然后使用拉取/注释API端点查看评审注释:
示例卷曲:
curl -H "Authorization: token PERSONALACCESSTOKEN" -get https://github.mycomp.com/api/v3/repos/MyRepo/MyProject/pulls/3/comments
curl -H "Authorization: token PERSONALACCESSTOKEN" -get https://github.mycomp.com/api/v3/repos/MyRepo/MyProject/issues/3/comments
如果您要查找的评论不是审阅评论,则需要使用问题/评论API端点:
示例卷曲:
curl -H "Authorization: token PERSONALACCESSTOKEN" -get https://github.mycomp.com/api/v3/repos/MyRepo/MyProject/pulls/3/comments
curl -H "Authorization: token PERSONALACCESSTOKEN" -get https://github.mycomp.com/api/v3/repos/MyRepo/MyProject/issues/3/comments