From 2ca0becf4458546dbe845d1e4ca79c81601f1c2c Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Thu, 6 Oct 2022 23:09:21 +0200 Subject: [PATCH] WIP: don --- controle_don/main.py | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/controle_don/main.py b/controle_don/main.py index 15b3130..d40b37d 100755 --- a/controle_don/main.py +++ b/controle_don/main.py @@ -45,10 +45,6 @@ def gestion_get_secret(): with open(GESTION_SECRET_FILE) as sfile: return sfile.readline().replace("\n", "") -def git_get_secret(): - with open(GIT_SECRET_FILE) as sfile: - return sfile.readline().replace("\n", "") - def get_file_content(filename): with open(filename) as sfile: return sfile.readlines() @@ -67,28 +63,14 @@ def gestion_read(req): data = req) return response.json() -def git_mail_ticket_read(req): - response = requests.get('https://git.a-lec.org/api/v4/projects/46/issues', - headers={'PRIVATE-TOKEN' : git_get_secret()}, - params = req) - return response.json() - -def git_xmpp_ticket_create(req): - response = requests.post('https://git.a-lec.org/api/v4/projects/44/issues', - headers={'PRIVATE-TOKEN' : git_get_secret()}, - data = req) - return response.json() - def setup_workdir(): if not os.path.isdir(WORKDIR): os.mkdir(WORKDIR) - if not "impayé" in os.listdir(WORKDIR): + if not "attente" in os.listdir(WORKDIR): os.mkdir(WORKDIR+"/impayé") - if not "expiré" in os.listdir(WORKDIR): - os.mkdir(WORKDIR+"/expiré") - if not "validé" in os.listdir(WORKDIR): + if not "nouveau" in os.listdir(WORKDIR): os.mkdir(WORKDIR+"/validé") - if not "transition" in os.listdir(WORKDIR): + if not "validé" in os.listdir(WORKDIR): os.mkdir(WORKDIR+"/transition") def sendmail(headers, data):