Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit be33138

Browse files
committed
Automated commit -> added return statement to parser in jatosapi
1 parent 56fbd08 commit be33138

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

jatosAPI.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,15 +226,16 @@ def move_txt(txt_files):
226226

227227

228228

229-
230-
def push():
231-
import git
232-
repo = git.Repo('./')
233-
repo.git.add('.')
234-
repo.git.commit('-m', 'new data')
235-
origin = repo.remote(name='origin')
236-
origin.push()
237-
return None
229+
def push(toke):
230+
#use the folder name as task
231+
task = os.path.basename(os.getcwd())
232+
233+
subprocess.run(['git', 'config', 'user.email', '[email protected]'])
234+
subprocess.run(['git', 'remote', 'set-url', 'origin', f'https://miloswrath:{toke}@github.com/HBClab/{task}'])
235+
subprocess.run(['git', 'config', 'user.name', 'miloswrath'])
236+
subprocess.run(['git', 'add', '.'])
237+
subprocess.run(['git', 'commit', '-m', 'Automated Commit -> New Data'])
238+
subprocess.run(['git', 'push', 'origin', 'main'])
238239

239240
def main():
240241
args = parse_cmd()

0 commit comments

Comments
 (0)