extend the mantishub module

This commit is contained in:
Andreas Zweili 2021-11-06 21:38:25 +01:00
parent 6b8faf3e31
commit ab5ae1509f
1 changed files with 7 additions and 2 deletions

View File

@ -15,7 +15,12 @@ class MantishubAPI:
return self.convert_to_todoist(tickets)
def convert_to_todoist(self, tickets):
for ticket in tickets:
print(ticket)
# TODO: add a function to convert mantis priority to todoist priority
# TODO: add a function to create the url
tasks = []
for ticket in tickets:
url = "https:mantishub.com"
content = "[{title}]({url})".format(title=ticket["summary"],
url=url)
tasks.append({"content": content, "label_ids": [2158784659, ]})
return tasks