Commit 85fa5666 authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

Update notify_job_offer.py

enhance code clarity
parent b9651494
"""Use python-gitlab API to make all project issues confidential"""
from follow_transfer import connect_to_gitlab, GITLAB_PROJECT_ID
gl = connect_to_gitlab()
project = gl.projects.get(GITLAB_PROJECT_ID)
project_issues = project.issues.list(all=True, lazy=True)
for issue in project_issues:
issue.confidential = True
issue.save()
\ No newline at end of file
......@@ -43,9 +43,9 @@ class Message:
job_url = "{}/job_{}.html".format(SITEURL, self.job_id)
self.d = {'JOB_URL': job_url}
if publisher:
self.d['PUBLISHER_MESSAGE'] = "{}, pour le".format(publisher.title())
self.d['SIGNATURE'] = "{}, pour le bureau du groupe Calcul".format(publisher.title())
else:
self.d['PUBLISHER_MESSAGE'] = 'Le'
self.d['SIGNATURE'] = 'Le bureau du groupe Calcul'
def parse_job_offer_file(self):
......@@ -103,7 +103,7 @@ Sans demande de votre part, elle restera en ligne jusqu'au $EXPIRE_DATE.
Cordialement,
$PUBLISHER_MESSAGE bureau du groupe Calcul.
$SIGNATURE
""")
def __init__(self, *args, **kwargs):
......@@ -133,7 +133,7 @@ Vous en retrouverez tous les détails sur $JOB_URL.
Cordialement,
$PUBLISHER_MESSAGE bureau du groupe Calcul.
$SIGNATURE
""")
def __init__(self, *args, **kwargs):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment