Esempio n. 1
0
    def run(self):
        range_ = self.arguments[0]
        if range_.endswith('x..HEAD'):
            return [nodes.paragraph(), nodes.bullet_list()]
        try:
            components = build_components(range_)
        except git.GitCommandError as exc:
            return [
                self.state.document.reporter.warning(
                    "Cannot find contributors for range '{}': {}".format(
                        range_, exc),
                    line=self.lineno)
            ]
        else:
            message = nodes.paragraph()
            message += nodes.Text(components['author_message'])

            listnode = nodes.bullet_list()

            for author in components['authors']:
                para = nodes.paragraph()
                para += nodes.Text(author)
                listnode += nodes.list_item('', para)

        return [message, listnode]
Esempio n. 2
0
    def run(self):
        range_ = self.arguments[0]
        if range_.endswith("x..HEAD"):
            return [nodes.paragraph(), nodes.bullet_list()]
        try:
            components = build_components(range_)
        except git.GitCommandError as exc:
            return [
                self.state.document.reporter.warning(
                    f"Cannot find contributors for range {repr(range_)}: {exc}",
                    line=self.lineno,
                )
            ]
        else:
            message = nodes.paragraph()
            message += nodes.Text(components["author_message"])

            listnode = nodes.bullet_list()

            for author in components["authors"]:
                para = nodes.paragraph()
                para += nodes.Text(author)
                listnode += nodes.list_item("", para)

        return [message, listnode]
Esempio n. 3
0
    def run(self):
        components = build_components(self.arguments[0])

        message = nodes.paragraph()
        message += nodes.Text(components['author_message'])

        listnode = nodes.bullet_list()

        for author in components['authors']:
            para = nodes.paragraph()
            para += nodes.Text(author)
            listnode += nodes.list_item('', para)

        return [message, listnode]
Esempio n. 4
0
    def run(self):
        range_ = self.arguments[0]
        try:
            components = build_components(range_)
        except git.GitCommandError:
            return [
                self.state.document.reporter.warning(
                    "Cannot find contributors for range '{}'".format(range_),
                    line=self.lineno)
            ]
        else:
            message = nodes.paragraph()
            message += nodes.Text(components['author_message'])

            listnode = nodes.bullet_list()

            for author in components['authors']:
                para = nodes.paragraph()
                para += nodes.Text(author)
                listnode += nodes.list_item('', para)

        return [message, listnode]