Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
b389ae77
Unverified
Commit
b389ae77
authored
Nov 15, 2023
by
Henry Schreiner
Committed by
GitHub
Nov 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update changelog script for categories (#4942)
parent
e250155a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletions
+27
-1
tools/make_changelog.py
+27
-1
No files found.
tools/make_changelog.py
View file @
b389ae77
#!/usr/bin/env python3
#!/usr/bin/env python3
from
__future__
import
annotations
import
re
import
re
...
@@ -29,6 +30,18 @@ issues_pages = ghapi.page.paged(
...
@@ -29,6 +30,18 @@ issues_pages = ghapi.page.paged(
)
)
issues
=
(
issue
for
page
in
issues_pages
for
issue
in
page
)
issues
=
(
issue
for
page
in
issues_pages
for
issue
in
page
)
missing
=
[]
missing
=
[]
cats_descr
=
{
"feat"
:
"New Features"
,
"fix"
:
"Bug fixes"
,
"fix(types)"
:
""
,
"fix(cmake)"
:
""
,
"docs"
:
"Documentation"
,
"tests"
:
"Tests"
,
"ci"
:
"CI"
,
"chore"
:
"Other"
,
"unknown"
:
"Uncategorised"
,
}
cats
:
dict
[
str
,
list
[
str
]]
=
{
c
:
[]
for
c
in
cats_descr
}
for
issue
in
issues
:
for
issue
in
issues
:
changelog
=
ENTRY
.
findall
(
issue
.
body
or
""
)
changelog
=
ENTRY
.
findall
(
issue
.
body
or
""
)
...
@@ -36,14 +49,27 @@ for issue in issues:
...
@@ -36,14 +49,27 @@ for issue in issues:
missing
.
append
(
issue
)
missing
.
append
(
issue
)
else
:
else
:
(
msg
,)
=
changelog
(
msg
,)
=
changelog
if
msg
.
startswith
(
"- "
):
msg
=
msg
[
2
:]
if
not
msg
.
startswith
(
"* "
):
if
not
msg
.
startswith
(
"* "
):
msg
=
"* "
+
msg
msg
=
"* "
+
msg
if
not
msg
.
endswith
(
"."
):
if
not
msg
.
endswith
(
"."
):
msg
+=
"."
msg
+=
"."
msg
+=
f
"
\n
`#{issue.number} <{issue.html_url}>`_"
msg
+=
f
"
\n
`#{issue.number} <{issue.html_url}>`_"
for
cat
in
cats
:
if
issue
.
title
.
lower
()
.
startswith
(
f
"{cat}:"
):
cats
[
cat
]
.
append
(
msg
)
break
else
:
cats
[
"unknown"
]
.
append
(
msg
)
print
(
Syntax
(
msg
,
"rst"
,
theme
=
"ansi_light"
,
word_wrap
=
True
))
for
cat
,
msgs
in
cats
.
items
():
if
msgs
:
desc
=
cats_descr
[
cat
]
print
(
f
"[bold]{desc}:
\n
"
if
desc
else
""
)
for
msg
in
msgs
:
print
(
Syntax
(
msg
,
"rst"
,
theme
=
"ansi_light"
,
word_wrap
=
True
))
print
()
print
()
if
missing
:
if
missing
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment