diff --git a/constants.py b/constants.py deleted file mode 100644 index d05ac3d..0000000 --- a/constants.py +++ /dev/null @@ -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") diff --git a/gitlab.py b/gitlab.py index 255cae8..236f2e0 100644 --- a/gitlab.py +++ b/gitlab.py @@ -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( diff --git a/utils.py b/utils.py index 2c508b6..1f48bc7 100644 --- a/utils.py +++ b/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}"