I'm trying to get a count of issues using PyGithub in a repository within a certain date range (the month). The date range is what I can't get right no matter what I've tried. Using the GitHub webui, this is the query I would use:
is:issue created:2019-10-01..2019-10-31 label:<label>
Using the code below gets me the issues and labels, but I can't get the date range to work. There's a since
parameter for get_issues
, but I can't get the range for the date to work.
Should I be doing this in a totally different manner?
repo = g.get_repo("someRepo")
label = repo.get_label('someLabel')
myIssues = repo.get_issues(labels=[label])
count = 0
for issue in myIssues:
if not issue.pull_request:
count = count + 1
print(count)