Skip to content

Commit

Permalink
Support labels in issues correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mjmaenpaa committed Dec 5, 2014
1 parent 96a44ef commit 5d25344
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gitlab.py
Expand Up @@ -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,
Expand Down

0 comments on commit 5d25344

Please sign in to comment.