Update sync.py
This commit is contained in:
Родитель
e4a6dc06fb
Коммит
b293c583f6
3
sync.py
3
sync.py
|
@ -14,6 +14,7 @@ class Sync:
|
|||
self.github = github
|
||||
self.jira = jira_project
|
||||
self.direction = direction
|
||||
self.labels = self.jira.labels
|
||||
|
||||
def alert_created(self, repo_id, alert_num):
|
||||
self.sync(
|
||||
|
@ -103,10 +104,12 @@ class Sync:
|
|||
# we have to push back the state to JIRA, because "fixed"
|
||||
# alerts cannot be transitioned to "open"
|
||||
issue.adjust_state(alert.get_state())
|
||||
issue.persist_labels(self.labels)
|
||||
return alert.get_state()
|
||||
else:
|
||||
# The user treats JIRA as the source of truth
|
||||
alert.adjust_state(issue.get_state())
|
||||
issue.persist_labels(self.labels)
|
||||
return issue.get_state()
|
||||
|
||||
def sync_repo(self, repo_id, states=None):
|
||||
|
|
Загрузка…
Ссылка в новой задаче