Esempio n. 1
0
def edit(issue_key):
    issue = client.get_issue(issue_key)
    editor = Editor(issue.description)
    description = editor.start()

    if description.strip() != issue.description.strip():
        if client.edit_issue(issue_key, {'description': description.strip()}):
            print('Okay, the description for {} has been updated.'.format(issue_key))
        else:
            print('There was an issue saving the new description:')
            print(description)
Esempio n. 2
0
def comment(issue_key):
    editor = Editor("""
# Leave a comment on {}
""".format(issue_key))
    comment = editor.start()

    if client.comment(issue_key, comment):
        print('Comment created')
    else:
        print('Comment failed')
        print(comment)