Last active
January 12, 2018 19:47
-
-
Save thehowl/e10b1526517a8436ec83fe8e15cf9edf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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