Commit 4671f332 authored by Benjamin Graillot's avatar Benjamin Graillot

[phabricator] nouvelle adresse mail

parent 1038df60
......@@ -24,7 +24,7 @@ def decode_header(header):
class Phabricator(source.Source):
def __init__(self):
source.Source.__init__(self, 'phabricator', 'noreply@phabricator.crans.org')
source.Source.__init__(self, 'phabricator', 'noreply@crans.org')
def parse_mail(self, mail):
sender = decode_header(mail['From'])
......@@ -35,6 +35,7 @@ class Phabricator(source.Source):
projects = [project.strip()[2:-1] for project in projects]
except:
projects = []
print(mail)
subject = decode_header(mail['Subject'])
tags = []
for m in re.finditer(r'\[(?P<tag>[^]]*)\]', subject):
......@@ -53,4 +54,4 @@ class Phabricator(source.Source):
print("No author:", sender)
return
author = m.group('author')
self.push_update(task, '\x0310{task}\x03 \x033{author}\x03 \x02{tag}\x02\x03 \x0315{name}\x03'.format(task=task_id, author=author, tag=tags[1], name=task_name))
self.push_update(task, '\x0310https://phabricator.crans.org/{task}\x03 \x033{author}\x03 \x02{tag}\x02\x03 \x0315{name}\x03'.format(task=task_id, author=author, tag=tags[1], name=task_name))
Markdown is supported
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