Skip to content

Instantly share code, notes, and snippets.

@tpokorra
Created October 26, 2021 15:13
Show Gist options
  • Save tpokorra/d608a8dde183e7bb51f135e052b301cc to your computer and use it in GitHub Desktop.
Save tpokorra/d608a8dde183e7bb51f135e052b301cc to your computer and use it in GitHub Desktop.
get closed issues from a milestone as preparation for OpenPetra release
#!/usr/bin/python3
import requests
import json
url = "https://api.github.com/repos/openpetra/openpetra/issues"
milestone = "17"
S = requests.Session()
headers = {'Accept': 'application/vnd.github.v3+json'}
# see https://docs.github.com/en/rest/reference/issues#list-repository-issues
r1 = S.get(url=url + "?milestone=" + milestone + "&state=closed&sort=updated", headers=headers)
issues = json.loads(r1.content)
#print(issues)
for issue in issues:
print("%s %s" % (issue["number"], issue["title"]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment