Skip to content

Commit 5d25344

Browse files
committed
Support labels in issues correctly
1 parent 96a44ef commit 5d25344

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

gitlab.py

+9
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,15 @@ class ProjectIssue(GitlabObject):
939939

940940
shortPrintAttr = 'title'
941941

942+
def _dataForGitlab(self, extra_parameters={}):
943+
# Gitlab-api returns labels in a json list and takes them in a
944+
# comma separated list.
945+
if hasattr(self, "labels") and self.labels is not None:
946+
labels = ", ".join(self.labels)
947+
extra_parameters.update(labels)
948+
949+
return super(ProjectIssue, self)._dataForGitlab(extra_parameters)
950+
942951
def Note(self, id=None, **kwargs):
943952
return ProjectIssueNote._getListOrObject(self.gitlab, id,
944953
project_id=self.project_id,

0 commit comments

Comments
 (0)