Created
March 21, 2023 22:19
-
-
Save eevmanu/519fbf41d7218f74d4f1513a5c56f879 to your computer and use it in GitHub Desktop.
get commits count from github repo using graphql API
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
{ | |
test1: repository(owner: "robfig", name: "cron") { | |
...RepoFragment | |
} | |
} | |
fragment RepoFragment on Repository { | |
name | |
defaultBranchRef { | |
name | |
target { | |
... on Commit { | |
id | |
history(first: 0) { | |
totalCount | |
} | |
} | |
} | |
} | |
} |
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
{ | |
"data": { | |
"test1": { | |
"name": "cron", | |
"defaultBranchRef": { | |
"name": "master", | |
"target": { | |
"id": "...", | |
"history": { | |
"totalCount": 147 | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment