From 15522d817c636cf2510f2ad1c7c1653e9d946bc6 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 14 2017 14:14:14 +0000 Subject: Add support for labels when syncing to jira --- diff --git a/sync2jira/downstream.py b/sync2jira/downstream.py index 93afaa9..dd11f58 100644 --- a/sync2jira/downstream.py +++ b/sync2jira/downstream.py @@ -131,6 +131,11 @@ def create_jira_issue(issue, config): kwargs['project'] = dict(key=issue.downstream['project']) if issue.downstream['component']: kwargs['components'] = [dict(name=issue.downstream['component'])] # TODO - make this a list in the config + if issue.downstream['labels']: + labels = issue.downstream['labels'] + if isinstance(labels) != list: + labels = [labels] + kwargs['labels'] = labels log.info("Creating issue.") downstream = client.create_issue(**kwargs)