【发布时间】:2019-10-19 21:12:42
【问题描述】:
使用关键字搜索存储库并在 git hub 中查找与该存储库关联的所有存储库,列出每个存储库的协作者。
使用关键字搜索存储库工作正常,我能够获得每个存储库的名称,但不是合作者, 有了它,我必须拥有查看协作者的推送权限。
查询{
rateLimit{
cost
remaining
resetAt
}
search(query: "-js created:>2015-01-01 language:JavaScript", type:REPOSITORY, first: 20) {
repositoryCount
pageInfo {
hasNextPage
endCursor
startCursor
}
edges {
node {
... on Repository {
name
url
collaborators(first: 100, affiliation: ALL)
{
edges{
node{
name
}
}
}
}
}
}
}
如果我喜欢下面的内容,我将获得合作者,但我想使用搜索功能并获得仅搜索到的存储库的合作者。
{ 用户(登录:“xxxx”){
repositories(first: 100){
nodes{
name
url
collaborators(first:100,affiliation:ALL){
nodes{
name
}
}
}
}
} }
【问题讨论】:
标签: graphql github-api