WIP: don
This commit is contained in:
parent
efbf63ff51
commit
2ca0becf44
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue