magnumical commited on
Commit
b5768dd
·
verified ·
1 Parent(s): 0fd18ef

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from git import Repo
2
+ import os
3
+
4
+
5
+
6
+ GITHUB_PAT = os.environ['GITHUB']
7
+ GIT_id = os.environ['GIT_id']
8
+ GIT_repo = os.environ['GIT_repo']
9
+
10
+ if GITHUB_PAT != []:
11
+ print("GITHUB_PAT set")
12
+
13
+ if not os.path.exists('cloned_repo'):
14
+ Repo.clone_from(f'https://{GIT_id}:{GITHUB_PAT}@github.com/{GIT_id}/{GIT_repo}.git' , './cloned_repo' )
15
+
16
+ import cloned_repo.main as main
17
+ from cloned_repo.main import *