Skip to content

Instantly share code, notes, and snippets.

@thehowl
Last active January 12, 2018 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thehowl/e10b1526517a8436ec83fe8e15cf9edf to your computer and use it in GitHub Desktop.
Save thehowl/e10b1526517a8436ec83fe8e15cf9edf to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import requests
import sys
a = set()
def fofo(uri):
resp = requests.get(uri)
if resp.status_code != 200:
print("AAAA")
return
nextLink = ""
for i in resp.headers["link"].split(','):
if i[i.index('"')+1:i.index('"')+5] == 'next':
nextLink = i[i.index("<")+1:i.index('>')]
break
data = resp.json()
for issue in data:
if "pull_request" in issue:
a.add(issue["user"]["login"])
if nextLink != "":
print("fetching " + nextLink)
fofo(nextLink)
fofo("https://api.github.com/repos/go-gitea/gitea/issues?state=closed&milestone=14")
print('\n'.join(["* [@" + i + "](https://github.com/" + i + ")" for i in sorted(a, key=str.lower)]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment