Remove constants
This commit is contained in:
parent
4cba81140d
commit
3bb2282dd0
3 changed files with 4 additions and 20 deletions
12
constants.py
12
constants.py
|
@ -1,12 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
DRY_RUN = False
|
|
||||||
PROJECT = "xfocko%2Fib111-reviews"
|
|
||||||
HOMEWORK = "hwX"
|
|
||||||
SUFFIX = ("", "-opravne")[0]
|
|
||||||
SUBMISSIONS = []
|
|
||||||
TOKEN = os.getenv("GITLAB_FI_TOKEN")
|
|
|
@ -1,10 +1,11 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
|
||||||
|
import os
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
PROJECT = os.getenv("PUSHEE_PROJECT")
|
||||||
from constants import PROJECT, TOKEN
|
TOKEN = os.getenv("GITLAB_FI_TOKEN")
|
||||||
|
|
||||||
|
|
||||||
def post_mr(
|
def post_mr(
|
||||||
|
|
7
utils.py
7
utils.py
|
@ -6,8 +6,7 @@ import re
|
||||||
from subprocess import run, CompletedProcess
|
from subprocess import run, CompletedProcess
|
||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
|
|
||||||
|
DRY_RUN = False
|
||||||
from constants import DRY_RUN, HOMEWORK, SUFFIX
|
|
||||||
|
|
||||||
|
|
||||||
def handle_error(process: CompletedProcess) -> int:
|
def handle_error(process: CompletedProcess) -> int:
|
||||||
|
@ -34,7 +33,3 @@ def make_pair(submission: str) -> Tuple[str, str]:
|
||||||
def mkcd(directory: str) -> None:
|
def mkcd(directory: str) -> None:
|
||||||
os.makedirs(directory, exist_ok=True)
|
os.makedirs(directory, exist_ok=True)
|
||||||
os.chdir(directory)
|
os.chdir(directory)
|
||||||
|
|
||||||
|
|
||||||
def get_branch(login: str) -> str:
|
|
||||||
return f"{HOMEWORK}{SUFFIX}-{login}"
|
|
||||||
|
|
Reference in a new issue