git_issue/cli.py
def show(service, **kwargs):
    """Show detail of a single issue."""
    issue = service.issue(kwargs.pop('number'))
    quiet = kwargs.pop('quiet')
    summary = kwargs.pop('summary')
    output = _issue_summary_(issue, issue.num_comments if summary else 0)
    if not summary:
        items = issue.comments()
        if not quiet:
            items += issue.events()
        for item in sorted(items):
            if isinstance(item, IssueComment):
                output += [
                    '',
                    '%sComment %s added %s%s' %
                    (Fore.YELLOW, item.id, item.created.humanize(),
                     Fore.RESET),
                    'Author:   %s' % item.author,
                    '',
                ]
                output += ['    %s' % line for line in item.body.splitlines()]
            elif isinstance(item, IssueEvent):
                output += [
                    '',
                    '%(color)s%(event)s %(created)s%(reset)s' % {
                        'color': Fore.YELLOW,
                        'event': item.event % _colors_(Fore.YELLOW),
                        'created': item.created.humanize(),
                        'reset': Fore.RESET,
                    },
                    'Actor:    %s' % item.actor,
                ]
    _pager_('\n'.join(output))
    exit(0)
Show detail of a single issue.
Show detail of a single issue.
Show detail of a single issue .
def show(service, **kwargs):
    issue = service.issue(kwargs.pop('number'))
    quiet = kwargs.pop('quiet')
    summary = kwargs.pop('summary')
    output = _issue_summary_(issue, issue.num_comments if summary else 0)
    if not summary:
        items = issue.comments()
        if not quiet:
            items += issue.events()
        for item in sorted(items):
            if isinstance(item, IssueComment):
                output += [
                    '',
                    '%sComment %s added %s%s' %
                    (Fore.YELLOW, item.id, item.created.humanize(),
                     Fore.RESET),
                    'Author:   %s' % item.author,
                    '',
                ]
                output += ['    %s' % line for line in item.body.splitlines()]
            elif isinstance(item, IssueEvent):
                output += [
                    '',
                    '%(color)s%(event)s %(created)s%(reset)s' % {
                        'color': Fore.YELLOW,
                        'event': item.event % _colors_(Fore.YELLOW),
                        'created': item.created.humanize(),
                        'reset': Fore.RESET,
                    },
                    'Actor:    %s' % item.actor,
                ]
    _pager_('\n'.join(output))
    exit(0)
def show ( service , ** kwargs ) : issue = service . issue ( kwargs . pop ( 'number' ) ) quiet = kwargs . pop ( 'quiet' ) summary = kwargs . pop ( 'summary' ) output = _issue_summary_ ( issue , issue . num_comments if summary else 0 ) if not summary : items = issue . comments ( ) if not quiet : items += issue . events ( ) for item in sorted ( items ) : if isinstance ( item , IssueComment ) : output += [ '' , '%sComment %s added %s%s' % ( Fore . YELLOW , item . id , item . created . humanize ( ) , Fore . RESET ) , 'Author:   %s' % item . author , '' , ] output += [ '    %s' % line for line in item . body . splitlines ( ) ] elif isinstance ( item , IssueEvent ) : output += [ '' , '%(color)s%(event)s %(created)s%(reset)s' % { 'color' : Fore . YELLOW , 'event' : item . event % _colors_ ( Fore . YELLOW ) , 'created' : item . created . humanize ( ) , 'reset' : Fore . RESET , } , 'Actor:    %s' % item . actor , ] _pager_ ( '\n' . join ( output ) ) exit ( 0 )
Show detail of a single issue.
Show detail of a single issue .
"""Show detail of a single issue."""
service