Beispiel #1
0
    def run(self, options, args):
        self.get_repo(options)

        opts, args = self.parser.parse_args(args)

        if opts.help:
            self.help()

        number = get_issue_number(
            args, self.parser, 'issue.comments requires a valid issue number')
        if number is None:
            return self.FAILURE

        return self.print_comments(number, opts)
Beispiel #2
0
    def run(self, options, args):
        self.get_repo(options)

        opts, args = self.parser.parse_args(args)

        if opts.help:
            self.help()

        number = get_issue_number(
            args, self.parser, 'issue.comments requires a valid issue number'
        )
        if number is None:
            return self.FAILURE

        return self.print_comments(number, opts)
Beispiel #3
0
    def run(self, options, args):
        self.get_repo(options)

        opts, args = self.parser.parse_args(args)

        if opts.help:
            self.help()

        number = get_issue_number(args, self.parser,
                                  'issue.reopen requires a valid number')

        if number is None:
            return self.FAILURE

        return self.reopen_issue(number)
Beispiel #4
0
    def run(self, options, args):
        self.get_repo(options)

        opts, args = self.parser.parse_args(args)

        if opts.help:
            self.help()

        number = get_issue_number(
            args, self.parser, 'issue.reopen requires a valid number'
        )

        if number is None:
            return self.FAILURE

        return self.reopen_issue(number)
Beispiel #5
0
    def run(self, options, args):
        self.get_repo(options)

        opts, args = self.parser.parse_args(args)

        if len(args) != 2:
            print("issue.assign requires 2 arguments.")
            self.help()
            return self.FAILURE

        if opts.help:
            self.help()

        number = get_issue_number(args, self.parser, "issue.reopen requires a valid number")

        if number is None:
            return self.FAILURE

        return self.assign_issue(number, args[1])
Beispiel #6
0
    def run(self, options, args):
        self.get_repo(options)

        opts, args = self.parser.parse_args(args)

        if len(args) != 2:
            print('issue.assign requires 2 arguments.')
            self.help()
            return self.FAILURE

        if opts.help:
            self.help()

        number = get_issue_number(args, self.parser,
                                  'issue.reopen requires a valid number')

        if number is None:
            return self.FAILURE

        return self.assign_issue(number, args[1])
Beispiel #7
0
    def run(self, options, args):
        self.get_repo(options)
        opts, args = self.parser.parse_args(args)

        if opts.help:
            self.help()

        number = get_issue_number(args, self.parser,
                                  'An issue number is required.')

        if number is None:
            return self.FAILURE

        issue = self.repo.issue(number)

        format_str = '{header}\n{sep}\n{body}\n'
        title = ('#{0.number}: {1[bold]}{0.title}{1[default]} - '
                 '@{0.user}'.format(issue, tc))
        body = wrap(issue.body_text or '')
        print(format_str.format(header=title, sep=sep, body=body))
        return self.SUCCESS
Beispiel #8
0
    def run(self, options, args):
        self.get_repo(options)
        opts, args = self.parser.parse_args(args)

        if opts.help:
            self.help()

        number = get_issue_number(
            args, self.parser, 'An issue number is required.'
        )

        if number is None:
            return self.FAILURE

        issue = self.repo.issue(number)

        format_str = '{header}\n{sep}\n{body}\n'
        title = ('#{0.number}: {1[bold]}{0.title}{1[default]} - '
                 '@{0.user}'.format(issue, tc))
        body = wrap(issue.body_text or '')
        print(format_str.format(header=title, sep=sep, body=body))
        return self.SUCCESS