我知道我可以通过以下方式获得给定用户打开的PR的数量
https://api.github.com/search/issues?q=is:pr+repo:<owner>/<repo>+author:<username>+is:open
但是给定用户审核过的PR的数量如何?
答案 0 :(得分:1)
v3(REST)API中似乎没有此功能,但是我在v4(GraphQL)API中找到了totalPullRequestReviewContributions
。
{
user(login: "nickmccurdy") {
contributionsCollection {
totalPullRequestReviewContributions
}
}
}
进行GraphQL查询后,您将获得此JSON结果。仅totalPullRequestReviewContributions
的数字应更改。
{
"data": {
"user": {
"contributionsCollection": {
"totalPullRequestReviewContributions": 80
}
}
}
}
由于它使用的是v4(GraphQL)API,因此您可以从GraphiQL API Explorer中对其进行测试:https://developer.github.com/v4/explorer/