forked from AntennaPod/AntennaPod
-
Notifications
You must be signed in to change notification settings - Fork 2
/
createDevelopersList.py
30 lines (27 loc) · 1.06 KB
/
createDevelopersList.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python3
import requests
MAINTAINERS = ['mfietz', 'ByteHamster']
FORMER_MAINTAINERS = ['TomHennen']
csvFile = open("app/src/main/assets/developers.csv", "w")
contributorsFile = open("CONTRIBUTORS", "a")
page = 1
hasMore = True
while hasMore:
json = requests.get('https://api.github.com/repos/AntennaPod/AntennaPod/contributors'
+ '?q=contributions&order=desc&per_page=100&page=' + str(page)).json()
for contributor in json:
role = 'Contributor'
if contributor['login'] == 'danieloeh':
role = 'Original creator of AntennaPod (retired)'
elif contributor['login'] in MAINTAINERS:
role = 'Maintainer'
elif contributor['login'] in FORMER_MAINTAINERS:
role = 'Maintainer (retired)'
line = contributor['login'].replace(";", "") + ';' + str(contributor['id']) + ';' + role
csvFile.write(line + '\n')
print(line)
contributorsFile.write(contributor['login'] + '\n')
page = page + 1
hasMore = len(json) > 0
csvFile.close()
contributorsFile.close()