-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
44 lines (38 loc) · 1.07 KB
/
app.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from github import Github
import files_manager
import issue_manager
from github import Auth
import build_folder
import os
# using an access token
token = os.environ['GH_TOKEN']
auth = Auth.Token(token)
path = 'repos/'
if not os.path.exists(path):
os.makedirs(path)
i = False
f = False
m = True
# ISSUES
if i:
g = Github(auth=auth)
print('\n\n\n\n********************************************')
print('DOWNLOADING ISSUES')
print('********************************************')
issues = issue_manager.run(g)
print('Issues downloaded: ', issues)
g.close()
if f:
# FILES
g = Github(auth=auth)
print('\n\n\n\n********************************************')
print('DOWNLOADING FILES')
print('********************************************')
files = files_manager.run(g)
print('Files downloaded: ', files)
g.close()
if m:
print('\n\n\n\n********************************************')
print('MOVING FILES')
print('********************************************')
build_folder.build()