summaryrefslogtreecommitdiff
path: root/gitlab.py
diff options
context:
space:
mode:
authorMika Mäenpää <mika.j.maenpaa@tut.fi>2014-12-05 12:56:36 +0200
committerMika Mäenpää <mika.j.maenpaa@tut.fi>2014-12-05 13:03:45 +0200
commit5d25344635d69c3c2c9bdc286bf1236c0343eca8 (patch)
tree858e14759fa8aa6bf24c28fd5d4ba06815bbc234 /gitlab.py
parent96a44ef3ebf7d5ffed82baef1ee627ef0a409f3a (diff)
downloadgitlab-5d25344635d69c3c2c9bdc286bf1236c0343eca8.tar.gz
Support labels in issues correctly
Diffstat (limited to 'gitlab.py')
-rw-r--r--gitlab.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/gitlab.py b/gitlab.py
index 8296d96..41cacbb 100644
--- a/gitlab.py
+++ b/gitlab.py
@@ -939,6 +939,15 @@ class ProjectIssue(GitlabObject):
shortPrintAttr = 'title'
+ def _dataForGitlab(self, extra_parameters={}):
+ # Gitlab-api returns labels in a json list and takes them in a
+ # comma separated list.
+ if hasattr(self, "labels") and self.labels is not None:
+ labels = ", ".join(self.labels)
+ extra_parameters.update(labels)
+
+ return super(ProjectIssue, self)._dataForGitlab(extra_parameters)
+
def Note(self, id=None, **kwargs):
return ProjectIssueNote._getListOrObject(self.gitlab, id,
project_id=self.project_id,