Created
February 5, 2020 01:13
-
-
Save gjyoung1974/0766c9f6a21455a8cd70eb9b819f2cf9 to your computer and use it in GitHub Desktop.
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
#!/bin/env python3 | |
from jira import JIRA | |
# Get these from ENV | |
user = "gordon.young@" | |
token = "" | |
jira_url = 'https://x.atlassian.net' | |
jira = JIRA(server=jira_url, basic_auth=(user, token)) | |
# # Find all issues reported by Gordon | |
# issues = jira.search_issues("assignee='Gordon Young'AND status='In Progress'") | |
# | |
# for issue in issues: | |
# print(str(issue) + ", " + str(issue.fields.assignee)) | |
# Create a DICT for each forseti finding object | |
issue_dict = { | |
'project': {'id': 14648}, | |
'summary': 'New issue from jira-python', | |
'description': 'Gordon Creating a bug', | |
'issuetype': {'name': 'Bug'}, | |
} | |
new_issue = jira.create_issue(fields=issue_dict) | |
print(new_issue) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment