Reputation: 601
https://api.github.com/repos/{org}/{repo}/issues
What query can allow us to find total count of issues?
Upvotes: 1
Views: 1371
Reputation: 45362
Using Rest API, you can use the search api:
GET https://api.github.com/search/issues?q=repo:bertrandmartel/tableau-scraping%20is:issue
https://api.github.com/search/issues?q=repo:bertrandmartel/tableau-scraping%20is:issue
Output
{
"total_count": 8,
....
}
You can also use Github graphql API using the following request :
{
repository(owner: "mui-org", name: "material-ui") {
issues {
totalCount
}
}
}
With curl:
curl -H "Authorization: token YOUR_TOKEN" \
-H "Content-Type:application/json" \
-d '{
"query": "{ repository(owner: \"mui-org\", name: \"material-ui\") { issues { totalCount } } }"
}' https://api.github.com/graphql
Sample output:
{
"data": {
"repository": {
"issues": {
"totalCount": 12760
}
}
}
}
Upvotes: 3