Last active
August 29, 2015 14:04
-
-
Save amuraru/0f0921950055e0d82b2f to your computer and use it in GitHub Desktop.
JIRA Command Line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| import jira.client as j | |
| import getpass | |
| JIRA_SERVER="https://issues.adobe.com" | |
| print "Creating an issue on %s" % JIRA_SERVER | |
| issue_project=raw_input("Issue Project: ") | |
| issue_type=raw_input("Issue Type: ") | |
| summary=raw_input("Issue Title: ") | |
| labels=[] | |
| user_raw_input = [] | |
| entry = raw_input("Issue Summary (enter . to end)\n") | |
| while entry != ".": | |
| user_raw_input.append(entry) | |
| entry = raw_input("") | |
| description = '\n'.join(user_raw_input) | |
| password = getpass.getpass('LDAP password: ') | |
| jira = j.JIRA(options={'server': JIRA_SERVER}, basic_auth=('amuraru', password)) | |
| new_issue = jira.create_issue(project={'key': issue_project}, summary=summary, issuetype={'name': issue_type}, description=description) | |
| jira.transition_issue(new_issue,'781') | |
| print ("[%s] - %s" % (new_issue.key, new_issue.fields.summary)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment