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