How to use the jira.client function in jira

To help you get started, we’ve selected a few jira examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / distributedlog / scripts / dev / dl-merge-pr.py View on Github external
def resolve_jira_issue(merge_branches, comment, jira_id):
    asf_jira = jira.client.JIRA({'server': JIRA_API_BASE},
                                basic_auth=(JIRA_USERNAME, JIRA_PASSWORD))

    result = raw_input("Resolve JIRA %s ? (y/n): " % jira_id)
    if result.lower() != "y":
        return

    try:
        issue = asf_jira.issue(jira_id)
    except Exception as e:
        fail("ASF JIRA could not find %s\n%s" % (jira_id, e))

    cur_status = issue.fields.status.name
    cur_summary = issue.fields.summary
    cur_assignee = issue.fields.assignee
    if cur_assignee is None:
        cur_assignee = "NOT ASSIGNED!!!"
github apache / flink / tools / merge_flink_pr.py View on Github external
def resolve_jira(title, merge_branches, comment):
    asf_jira = jira.client.JIRA({'server': JIRA_API_BASE},
                                basic_auth=(JIRA_USERNAME, JIRA_PASSWORD))

    default_jira_id = ""
    search = re.findall("FLINK-[0-9]{4,5}", title)
    if len(search) > 0:
        default_jira_id = search[0]

    jira_id = raw_input("Enter a JIRA id [%s]: " % default_jira_id)
    if jira_id == "":
        jira_id = default_jira_id

    try:
        issue = asf_jira.issue(jira_id)
    except Exception as e:
        fail("ASF JIRA could not find %s\n%s" % (jira_id, e))
github databricks / spark-pr-dashboard / sparkprs / jira_api.py View on Github external
def get_jira_client():
    # Bump up the default fetch deadline.
    # This setting is thread-specific, which is why we set it here.
    urlfetch.set_default_fetch_deadline(60)
    return jira.client.JIRA({'server': app.config['JIRA_API_BASE']},
                            basic_auth=(app.config['JIRA_USERNAME'],
                                        app.config['JIRA_PASSWORD']))
github apache / incubator-hivemall / bin / merge_pr.py View on Github external
def resolve_jira_issue(merge_branches, comment, default_jira_id=''):
    asf_jira = jira.client.JIRA({'server': JIRA_API_BASE},
                                basic_auth=(JIRA_USERNAME, JIRA_PASSWORD))

    jira_id = input('Enter a JIRA id [%s]: ' % default_jira_id)
    if jira_id == '':
        jira_id = default_jira_id

    try:
        issue = asf_jira.issue(jira_id)
    except Exception as e:
        fail('ASF JIRA could not find %s\n%s' % (jira_id, e))

    cur_status = issue.fields.status.name
    cur_summary = issue.fields.summary
    cur_assignee = issue.fields.assignee
    if cur_assignee is None:
        cur_assignee = 'NOT ASSIGNED!!!'
github AppEnlight / appenlight / backend / src / appenlight / models / integrations / jira.py View on Github external
def __init__(self, user_name, password, host_name, project, request=None):
        self.user_name = user_name
        self.password = password
        self.host_name = host_name
        self.project = project
        self.request = request
        try:
            self.client = jira.client.JIRA(
                options={"server": host_name}, basic_auth=(user_name, password)
            )
        except jira.JIRAError as e:
            raise IntegrationException(
                "Communication problem: HTTP_STATUS:%s, URL:%s "
                % (e.status_code, e.url)
            )
github qubole / spark-on-lambda / dev / merge_spark_pr.py View on Github external
def resolve_jira_issue(merge_branches, comment, default_jira_id=""):
    asf_jira = jira.client.JIRA({'server': JIRA_API_BASE},
                                basic_auth=(JIRA_USERNAME, JIRA_PASSWORD))

    jira_id = raw_input("Enter a JIRA id [%s]: " % default_jira_id)
    if jira_id == "":
        jira_id = default_jira_id

    try:
        issue = asf_jira.issue(jira_id)
    except Exception as e:
        fail("ASF JIRA could not find %s\n%s" % (jira_id, e))

    cur_status = issue.fields.status.name
    cur_summary = issue.fields.summary
    cur_assignee = issue.fields.assignee
    if cur_assignee is None:
        cur_assignee = "NOT ASSIGNED!!!"
github apache / parquet-mr / dev / merge_parquet_pr.py View on Github external
def resolve_jira(title, merge_branches, comment):
    asf_jira = jira.client.JIRA({'server': JIRA_API_BASE},
                                basic_auth=(JIRA_USERNAME, JIRA_PASSWORD))

    default_jira_id = exctract_jira_id(title)

    jira_id = raw_input("Enter a JIRA id [%s]: " % default_jira_id)
    if jira_id == "":
        jira_id = default_jira_id

    try:
        issue = asf_jira.issue(jira_id)
    except Exception as e:
        fail("ASF JIRA could not find %s\n%s" % (jira_id, e))

    cur_status = issue.fields.status.name
    cur_summary = issue.fields.summary
    cur_assignee = issue.fields.assignee
github apache / parquet-format / dev / merge_parquet_pr.py View on Github external
def resolve_jira(title, merge_branches, comment):
    asf_jira = jira.client.JIRA({'server': JIRA_API_BASE},
                                basic_auth=(JIRA_USERNAME, JIRA_PASSWORD))

    default_jira_id = exctract_jira_id(title)

    jira_id = raw_input("Enter a JIRA id [%s]: " % default_jira_id)
    if jira_id == "":
        jira_id = default_jira_id

    try:
        issue = asf_jira.issue(jira_id)
    except Exception as e:
        fail("ASF JIRA could not find %s\n%s" % (jira_id, e))

    cur_status = issue.fields.status.name
    cur_summary = issue.fields.summary
    cur_assignee = issue.fields.assignee
github apache / parquet-format / dev / merge_parquet_pr.py View on Github external
def check_jira(title):
    jira_id = exctract_jira_id(title)
    asf_jira = jira.client.JIRA({'server': JIRA_API_BASE},
                                basic_auth=(JIRA_USERNAME, JIRA_PASSWORD))
    try:
        issue = asf_jira.issue(jira_id)
    except Exception as e:
        fail("ASF JIRA could not find %s\n%s" % (jira_id, e))