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
|
||||
|
||||
|
||||
import os
|
||||
import requests
|
||||
|
||||
|
||||
from constants import PROJECT, TOKEN
|
||||
PROJECT = os.getenv("PUSHEE_PROJECT")
|
||||
TOKEN = os.getenv("GITLAB_FI_TOKEN")
|
||||
|
||||
|
||||
def post_mr(
|
||||
|
|
7
utils.py
7
utils.py
|
@ -6,8 +6,7 @@ import re
|
|||
from subprocess import run, CompletedProcess
|
||||
from typing import Tuple
|
||||
|
||||
|
||||
from constants import DRY_RUN, HOMEWORK, SUFFIX
|
||||
DRY_RUN = False
|
||||
|
||||
|
||||
def handle_error(process: CompletedProcess) -> int:
|
||||
|
@ -34,7 +33,3 @@ def make_pair(submission: str) -> Tuple[str, str]:
|
|||
def mkcd(directory: str) -> None:
|
||||
os.makedirs(directory, exist_ok=True)
|
||||
os.chdir(directory)
|
||||
|
||||
|
||||
def get_branch(login: str) -> str:
|
||||
return f"{HOMEWORK}{SUFFIX}-{login}"
|
||||
|
|
Reference in a new issue