是否有一种方法可以仅提取未归档的存储库?
{
user(login: "SrikanthBandaru") {
id
email
isHireable
name
repositories(first: 100) { # fetch only the repos that are not archived
edges {
node {
name
isArchived
shortDescriptionHTML
description
descriptionHTML
repositoryTopics(first: 10) {
edges {
node {
topic {
name
}
}
}
}
homepageUrl
url
}
}
}
}
}
答案 0 :(得分:1)
除了使用archived search parameter进行用户查询外,您还可以使用搜索查询。还可以使用fork:true
来包含forks:
{
user: user(login: "simon04") {
id
email
isHireable
name
}
repos: search(query: "user:simon04 fork:true archived:false", type: REPOSITORY, first: 100) {
repositoryCount
edges {
node {
... on Repository {
nameWithOwner
name
isArchived
shortDescriptionHTML
description
descriptionHTML
repositoryTopics(first: 10) {
edges {
node {
topic {
name
}
}
}
}
homepageUrl
url
}
}
}
}
}
答案 1 :(得分:0)
您应该能够将过滤器添加到查询的存储库部分:
repositories(first: 100, isArchived: false) { # fetch only the repos that are not archived
...
}
The docs they have some examples和name
和owner
过滤器。