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)
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
def publish(): """Push branch to origin""" branch = generate_branch_name(storage.get_current_issue()) git.push(branch)
def commit(message): """Commit for issue""" issue_key = storage.get_current_issue().key git.commit('{} {}'.format(issue_key, message))
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)
def working_on_issue(issue): current_issue = storage.get_current_issue() if current_issue: return issue == current_issue return False