Format with black
This commit is contained in:
parent
6f6130b3b3
commit
d74aae0639
|
@ -4,13 +4,12 @@ from gitlab import GitlabAPI
|
|||
from mantishub import MantishubAPI
|
||||
import utils
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
if __name__ == "__main__":
|
||||
# initialise the settings
|
||||
config = settings.read_config("todoist_interface.yml")
|
||||
|
||||
# initialise Todoist and Gitlab
|
||||
todoist = TodoistAPI(config['todoist']['token'])
|
||||
todoist = TodoistAPI(config["todoist"]["token"])
|
||||
|
||||
# Setup the todoist tasks
|
||||
tasks = []
|
||||
|
@ -19,9 +18,11 @@ if __name__ == '__main__':
|
|||
gitlab_labeled_tasks = []
|
||||
gitlab_tasks = []
|
||||
if "gitlab" in config:
|
||||
gitlab = GitlabAPI(config["gitlab"]["url"],
|
||||
config["gitlab"]["token"],
|
||||
config["gitlab"]["assignee"])
|
||||
gitlab = GitlabAPI(
|
||||
config["gitlab"]["url"],
|
||||
config["gitlab"]["token"],
|
||||
config["gitlab"]["assignee"],
|
||||
)
|
||||
|
||||
# Get the Gitlab tasks
|
||||
gitlab_tasks = gitlab.get_issues()
|
||||
|
@ -51,8 +52,18 @@ if __name__ == '__main__':
|
|||
|
||||
if missing_gitlab_tasks or missing_mantis_tasks:
|
||||
if missing_gitlab_tasks:
|
||||
todoist.create_tasks(missing_gitlab_tasks, ["gitlab",])
|
||||
todoist.create_tasks(
|
||||
missing_gitlab_tasks,
|
||||
[
|
||||
"gitlab",
|
||||
],
|
||||
)
|
||||
if missing_mantis_tasks:
|
||||
todoist.create_tasks(missing_mantis_tasks, ["mantis",])
|
||||
todoist.create_tasks(
|
||||
missing_mantis_tasks,
|
||||
[
|
||||
"mantis",
|
||||
],
|
||||
)
|
||||
exit(0)
|
||||
print("Nothing new to add.")
|
||||
|
|
Loading…
Reference in New Issue