问题描述
我想使用GitHub Graphql api向项目贡献者进行查询,任何人都可以给我一些如何制作的提示吗?尝试了一段时间,我想我缺少了一些小要素.
I want to query using GitHub Graphql api for project contributors, can anyone give me any hints how to make it? Just been trying for some time, and I guess that I am missing some small element.
我想得到诸如 https://api之类的东西.github.com/repos/facebook/react/contributors?page=15 但仅用于贡献量
I'd like to get sth like https://api.github.com/repos/facebook/react/contributors?page=15 but only for amount of conttributions
问候!
推荐答案
更新:2020年5月.
updated: May, 2020.
Github GraphQL API当前不支持获取回购的贡献者
.
Github GraphQL API currently don't support getting contributors
of a repo.
您可以通过以下方式获得合作者
....
You can get the collaborators
though....
query {
repository(owner: "peek", name: "peek") {
id
name
collaborators(first: 10, affiliation: ALL) {
edges {
permission
node {
id
login
name
}
}
}
}
rateLimit {
cost
}
}
您需要具有对存储库的推送权限才能查看协作者.
You need to have push rights to the repository to view the collaborators.
这篇关于github graphql查询项目贡献者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!