Exemple #1
0
def render_issue_key(issue):
    underline = ''
    if storage.get_current_issue():
        if working_on_issue(issue):
            underline = 'underline'
    else:
        if working_on_story(issue):
            underline = 'underline'
    return ('bold %s' % underline, issue.key)
Exemple #2
0
def get_pointer_index(stories):
    flatten_issues = get_flatten_issues(stories)
    current_issue = storage.get_current_issue()
    current_story = storage.get_current_story()

    for current in [current_issue, current_story]:
        if current:
            try:
                return flatten_issues.index(current)
            except ValueError:
                pass
    return 0
Exemple #3
0
def publish():
    """Push branch to origin"""
    branch = generate_branch_name(storage.get_current_issue())
    git.push(branch)
Exemple #4
0
def commit(message):
    """Commit for issue"""
    issue_key = storage.get_current_issue().key
    git.commit('{} {}'.format(issue_key, message))
Exemple #5
0
def status():
    """Get work status"""
    click.echo("You're working on story: {}".format(storage.get_current_story()))
    click.echo("You're working on issue: {}".format(storage.get_current_issue()))
    click.echo("Stories:")
    cli.choose_interactive(filter_function=lambda issue: False)
Exemple #6
0
def working_on_issue(issue):
    current_issue = storage.get_current_issue()
    if current_issue:
        return issue == current_issue
    return False