Exemple #1
0
def fix_issue(issue_key):
    config = read_config()
    conn = get_conn(config)
    issue = get_issue_by_key(conn, issue_key)
    transition_issue(conn, issue, "Reopen Issue")
    transition_issue(conn, issue, "Start Progress")
    transition_issue(conn, issue, "Pull Request")
    transition_issue(conn, issue, "Ready For Deployment")
    transition_issue(conn, issue, "Deployed")
Exemple #2
0
def advance(issue_key):
    config = read_config()
    conn = get_conn(config)
    issue = get_issue_by_key(conn, issue_key)
    result = advance_issue(conn, issue)
    if not result:
        msg = f"Failed to transition, issue still {issue.fields.status.name}"
    else:
        msg = f"Transitioned from {issue.fields.status.name} to {result}"
    click.echo(msg)
Exemple #3
0
def add_epic_to_issue(issue_key, epic_key):
    config = read_config()
    conn = get_conn(config)
    issue = get_issue_by_key(conn, issue_key)
    try:
        epic_issue = get_issue_by_key(conn, epic_key)
    except Exception as e:
        click.echo(f"Could not find an epic with the key {epic_key}")
    try:
        associate_epic_to_issue(conn, issue, epic_issue)
        issue = get_issue_by_key(conn, issue_key)
        confirmed_epic_key = issue.fields.customfield_10910
        click.echo(f"Added epic {confirmed_epic_key} to {issue_key}")
    except Exception as e:
        breakpoint()
        click.echo(f"Could not add epic {epic_key} to {issue_key}")
Exemple #4
0
def edit(issue_key):
    config = read_config()
    conn = get_conn(config)
    edit_issue(conn, issue_key)
Exemple #5
0
def print_fields_for(issue_key):
    config = read_config()
    conn = get_conn(config)
    issue = get_issue_by_key(conn, issue_key)
    print_issue_fields(issue)
Exemple #6
0
def inspect(issue_key):
    config = read_config()
    conn = get_conn(config)
    issue = get_issue_by_key(conn, issue_key)
    breakpoint()
Exemple #7
0
def get_issue(issue_key):
    config = read_config()
    conn = get_conn(config)
    issue = get_issue_by_key(conn, issue_key)
    print(get_printable_issue(issue, conn))
Exemple #8
0
def mine():
    config = read_config()
    conn = get_conn(config)
    for issue in get_open_issues(conn):
        issue_msg = get_printable_issue_brief(issue)
        click.echo(issue_msg)
Exemple #9
0
def explore():
    config = read_config()
    conn = get_conn(config)
    breakpoint()
Exemple #10
0
def ls(status):
    config = read_config()
    conn = get_conn(config)
    for issue in get_issues_for_status(conn, status):
        click.echo(get_printable_issue_brief(issue))
Exemple #11
0
def new():
    config = read_config()
    conn = get_conn(config)
    new_issue = create_new_issue(conn, config)
    click.echo(new_issue)
Exemple #12
0
def get_all_users():
    config = read_config()
    conn = get_conn(config)
    for user in get_users(conn):
        click.echo(UserModel.from_API(user))
Exemple #13
0
def epics_for_project(project_name):
    config = read_config()
    conn = get_conn(config)
    for e in get_all_epics(conn, project_name):
        click.echo(f"{e.fields.summary} ({e.key})")
Exemple #14
0
def rm(issue_key):
    config = read_config()
    conn = get_conn(config)
    issue = get_issue_by_key(conn, issue_key)
    issue.delete()