sigmavirus24 / github3.py

Hi, I'm a library for interacting with GItHub's REST API in a convenient and ergonomic way. I work on Python 3.6+.
https://github3.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.21k stars 402 forks source link

The search result `total_count` is always 0 #1111

Open theoctober19th opened 2 years ago

theoctober19th commented 2 years ago

I'm trying to use GitHub3.py to find the number of total issues in a repository. For that, I want to use the Search API to search for the issues in a particular repository.

For example, with the raw GitHub API, I can request https://api.github.com/search/issues?q=repo%3Asigmavirus24/github3.py and then get the total issues count in "total_count" key.

However, the following code snippet gives me zero:

gh = login(token=API_TOKEN)
count = gh.search_issues(query="repo: sigmavirus24/github3.py").total_count
print(count)
# 0