diff --git a/bicho/backends/github.py b/bicho/backends/github.py index ef589ae..77d1ae0 100644 --- a/bicho/backends/github.py +++ b/bicho/backends/github.py @@ -394,11 +394,15 @@ def analyze_bug(self, bug): bug['updated_at'] + ' (ratelimit = ' + str(self.remaining_ratelimit) + ")") + bug_type = unicode('') # There is no bug type with Github. Some labels are used as bug type. issue = bug['id'] + labels_a = [] if bug['labels']: - bug_type = bug['labels'][0]['name'] # FIXME + for i in range(0, len(bug['labels'])): + labels_a.append (bug['labels'][i]['name']) + labels=", ".join(labels_a) else: - bug_type = unicode('') + labels = unicode('') summary = bug['title'] desc = bug['body'] submitted_by = self.__get_user(bug['user']['login']) @@ -418,6 +422,8 @@ def analyze_bug(self, bug): issue.set_description(bug['body']) issue.set_web_link(bug['html_url']) + issue.set_labels(labels) + try: if bug['closed_at']: issue.set_closed_at(self.__to_datetime(bug['closed_at']))