GitHub GraphQL 获取未归档的存储库
GitHub GraphQL fetch repositories that are not archived
有没有办法只获取未归档的回购?
{
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
}
}
}
}
}
除了 archived search parameter 的用户查询之外,您还可以使用搜索查询。还使用 fork:true
来包含分叉:
{
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
}
}
}
}
}
有没有办法只获取未归档的回购?
{
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
}
}
}
}
}
除了 archived search parameter 的用户查询之外,您还可以使用搜索查询。还使用 fork:true
来包含分叉:
{
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
}
}
}
}
}