Spaces:
Running
Running
Commit
·
124f795
1
Parent(s):
b92863b
Update app.py
Browse files
app.py
CHANGED
@@ -13,26 +13,9 @@ import gradio as gr
|
|
13 |
app_id = '307916'
|
14 |
owner='duerrsimon'
|
15 |
repo_name='bioicons'
|
16 |
-
|
17 |
-
# with open('bot_key.pem','r') as cert_file:
|
18 |
-
# app_key = cert_file.read()
|
19 |
-
|
20 |
app_key = os.environ.get('GITHUB_TOKEN')
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
git_integration = GithubIntegration(
|
25 |
-
app_id,
|
26 |
-
app_key,
|
27 |
-
)
|
28 |
-
api = Github(
|
29 |
-
login_or_token=git_integration.get_access_token(
|
30 |
-
git_integration.get_repo_installation(owner, repo_name).id
|
31 |
-
).token
|
32 |
-
)
|
33 |
-
|
34 |
-
site = api.get_repo('duerrsimon/bioicons')
|
35 |
-
|
36 |
|
37 |
|
38 |
licenses = ['mit', 'cc-by-3.0', 'cc-0', 'cc-by-4.0', 'bsd', 'cc-by-sa-3.0', 'cc-by-sa-4.0']
|
@@ -76,6 +59,20 @@ def remove_special_chars(author):
|
|
76 |
return author
|
77 |
|
78 |
def process_and_create_pull(icon_files,category, new_cateogry_check, new_category, license, creator_name, creator_url, copyright, github_user):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
if copyright:
|
80 |
if new_cateogry_check:
|
81 |
category = remove_special_chars(new_category)
|
|
|
13 |
app_id = '307916'
|
14 |
owner='duerrsimon'
|
15 |
repo_name='bioicons'
|
16 |
+
|
|
|
|
|
|
|
17 |
app_key = os.environ.get('GITHUB_TOKEN')
|
18 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
|
21 |
licenses = ['mit', 'cc-by-3.0', 'cc-0', 'cc-by-4.0', 'bsd', 'cc-by-sa-3.0', 'cc-by-sa-4.0']
|
|
|
59 |
return author
|
60 |
|
61 |
def process_and_create_pull(icon_files,category, new_cateogry_check, new_category, license, creator_name, creator_url, copyright, github_user):
|
62 |
+
|
63 |
+
|
64 |
+
git_integration = GithubIntegration(
|
65 |
+
app_id,
|
66 |
+
app_key,
|
67 |
+
)
|
68 |
+
api = Github(
|
69 |
+
login_or_token=git_integration.get_access_token(
|
70 |
+
git_integration.get_repo_installation(owner, repo_name).id
|
71 |
+
).token
|
72 |
+
)
|
73 |
+
|
74 |
+
site = api.get_repo('duerrsimon/bioicons')
|
75 |
+
|
76 |
if copyright:
|
77 |
if new_cateogry_check:
|
78 |
category = remove_special_chars(new_category)
|