8from rich.syntax
import Syntax
12 Suggested \s changelog \s entry:
20 re.DOTALL | re.VERBOSE,
26api = ghapi.all.GhApi(owner="pybind", repo=
"pybind11")
28issues_pages = ghapi.page.paged(
29 api.issues.list_for_repo, labels=
"needs changelog", state=
"closed"
31issues = (issue
for page
in issues_pages
for issue
in page)
35 changelog = ENTRY.findall(issue.body)
38 if not msg.startswith(
"* "):
40 if not msg.endswith(
"."):
43 msg += f
"\n `#{issue.number} <{issue.html_url}>`_"
45 print(Syntax(msg,
"rst", theme=
"ansi_light", word_wrap=
True))
53 print(
"[blue]" +
"-" * 30)
57 print(f
"[red bold]Missing:[/red bold][red] {issue.title}")
58 print(f
"[red] {issue.html_url}\n")
60 print(
"[bold]Template:\n")
61 msg =
"## Suggested changelog entry:\n\n```rst\n\n```"
62 print(Syntax(msg,
"md", theme=
"ansi_light"))