git_issue/cli.py
def close(service, **kwargs):
    """Close an existing open issue."""
    issue = service.issue(kwargs.pop('number'))
    if issue.state != 'open':
        raise GitIssueError('issue %s is not open' % issue.number)
    comment = None
    if not kwargs['no_message']:
        if kwargs['message']:
            comment = kwargs.pop('message')
        else:
            comment = '\n'.join(_editor_())
        if len(comment.strip()) == 0:
            raise GitIssueError('aborted due to empty message')
    issue = issue.close(comment=comment)
    _finish_('Closed', issue.number, issue.url())
Close an existing open issue.
Close an existing open issue.
Close an existing open issue .
def close(service, **kwargs):
    issue = service.issue(kwargs.pop('number'))
    if issue.state != 'open':
        raise GitIssueError('issue %s is not open' % issue.number)
    comment = None
    if not kwargs['no_message']:
        if kwargs['message']:
            comment = kwargs.pop('message')
        else:
            comment = '\n'.join(_editor_())
        if len(comment.strip()) == 0:
            raise GitIssueError('aborted due to empty message')
    issue = issue.close(comment=comment)
    _finish_('Closed', issue.number, issue.url())
def close ( service , ** kwargs ) : issue = service . issue ( kwargs . pop ( 'number' ) ) if issue . state != 'open' : raise GitIssueError ( 'issue %s is not open' % issue . number ) comment = None if not kwargs [ 'no_message' ] : if kwargs [ 'message' ] : comment = kwargs . pop ( 'message' ) else : comment = '\n' . join ( _editor_ ( ) ) if len ( comment . strip ( ) ) == 0 : raise GitIssueError ( 'aborted due to empty message' ) issue = issue . close ( comment = comment ) _finish_ ( 'Closed' , issue . number , issue . url ( ) )
Close an existing open issue.
Close an existing open issue .
"""Close an existing open issue."""
service