Remove constants

This commit is contained in:
Matej Focko 2019-11-30 13:49:44 +01:00
parent 4cba81140d
commit 3bb2282dd0
3 changed files with 4 additions and 20 deletions

View file

@ -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")

View file

@ -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(

View file

@ -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}"