Created
October 8, 2019 09:48
-
-
Save smorcuend/31975e48a9dbd68dedf3510608a87130 to your computer and use it in GitHub Desktop.
Github_APIv4: These queries will fetch the organization repository information that is sorted by the last push/commit made using the orderBy field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query($cursor: String, $org: String = "") { | |
organization(login: $org) { | |
repositories( | |
first: 50 | |
after: $cursor | |
orderBy: { field: PUSHED_AT, direction: DESC } | |
) { | |
totalCount | |
pageInfo { | |
endCursor | |
__typename | |
} | |
edges { | |
cursor | |
node { | |
name | |
descriptionHTML | |
license | |
stargazers(first: 50) { | |
totalCount | |
} | |
repositoryTopics(first: 20) { | |
edges { | |
node { | |
topic { | |
name | |
} | |
} | |
} | |
} | |
forkCount | |
isFork | |
createdAt | |
updatedAt | |
pushedAt | |
homepageUrl | |
url | |
primaryLanguage { | |
name | |
color | |
} | |
collaborators(first: 50, affiliation: DIRECT) { | |
edges { | |
node { | |
name | |
login | |
avatarUrl | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query($org: String = "") { | |
organization(login: $org) { | |
repositories(first: 50, orderBy: { field: PUSHED_AT, direction: DESC }) { | |
totalCount | |
pageInfo { | |
endCursor | |
__typename | |
} | |
edges { | |
node { | |
name | |
descriptionHTML | |
license | |
stargazers(first: 50) { | |
totalCount | |
} | |
repositoryTopics(first: 20) { | |
edges { | |
node { | |
topic { | |
name | |
} | |
} | |
} | |
} | |
forkCount | |
isFork | |
createdAt | |
updatedAt | |
pushedAt | |
homepageUrl | |
url | |
primaryLanguage { | |
name | |
color | |
} | |
collaborators(first: 50, affiliation: DIRECT) { | |
edges { | |
node { | |
name | |
login | |
avatarUrl | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment