def mark_googlecode_issue_migrated(client, author_name, project_name, issue_id, github_url): comment_text = "Migrated to {0}".format(github_url) client.update_issue(project_name, issue_id, author=author_name, comment=comment_text, status='Migrated')
def modifying_an_issue_or_creating_issue_comments(self, client, project_name, issue_id, owner, assignee): """Add a comment and update metadata in an issue.""" return client.update_issue(project_name, issue_id, owner, comment='My comment here.', summary='New Summary', status='Accepted', owner=assignee, labels=['-label0', 'label1'], ccs=[owner])
def modifying_an_issue_or_creating_issue_comments(self, client, project_name, issue_id, owner, assignee): """Add a comment and update metadata in an issue.""" return client.update_issue( project_name, issue_id, owner, comment="My comment here.", summary="New Summary", status="Accepted", owner=assignee, labels=["-label0", "label1"], ccs=[owner], )
def modifying_an_issue_or_creating_issue_comments(self, client, project_name, issue_id, owner, assignee): """Add a comment and update metadata in an issue.""" return client.update_issue( project_name, issue_id, owner, comment='My comment here.', summary='New Summary', status='Accepted', owner=assignee, labels=['-label0', 'label1'], ccs=[owner])
item['reporter']['username']) desc += "On: %s\n" % item['created'] if item['assignee']['_text'] != 'Unassigned': desc += "Assigned to: %s (%s)\n" % (item['assignee']['_text'], item['assignee']['username']) desc += "\n" + html2text(item['description']) labels = ['jira'] if 'component' in item: if isinstance(item['component'], str): labels.append(item['component']) else: print "weird component:", item['component'] result = client.add_issue( project, item['title'], desc, USERNAME, labels=labels) comments = item.get('comments', {'comment': []})['comment'] if isinstance(comments, dict): comments = [comments] for comment in comments: text = "By: %s\nOn: %s\n\n%s" % (comment['author'], comment['created'], comment['_text']) client.update_issue( project, result.get_id().rsplit('/', 1)[1], USERNAME, comment=html2text(text), ccs=[])