Skip to content

Commit da631e9

Browse files
committed
chore: Template upgrade
1 parent 22ff7df commit da631e9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 0.7.1
2+
_commit: 0.7.2
33
_src_path: gh:pawamoy/copier-pdm
44
author_email: pawamoy@pm.me
55
author_fullname: "Timoth\xE9e Mazzucotelli"

duties.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def update_changelog(
4343
marker: str,
4444
version_regex: str,
4545
template_url: str,
46-
commit_style: str,
4746
) -> None:
4847
"""
4948
Update the given changelog file in place.
@@ -53,15 +52,16 @@ def update_changelog(
5352
marker: The line after which to insert new contents.
5453
version_regex: A regular expression to find currently documented versions in the file.
5554
template_url: The URL to the Jinja template used to render contents.
56-
commit_style: The style of commit messages to parse.
5755
"""
5856
from git_changelog.build import Changelog
57+
from git_changelog.commit import AngularStyle
5958
from jinja2.sandbox import SandboxedEnvironment
6059

60+
AngularStyle.DEFAULT_RENDER.insert(0, AngularStyle.TYPES["build"])
6161
env = SandboxedEnvironment(autoescape=False)
6262
template_text = urlopen(template_url).read().decode("utf8") # noqa: S310
6363
template = env.from_string(template_text)
64-
changelog = Changelog(".", style=commit_style)
64+
changelog = Changelog(".", style="angular")
6565

6666
if len(changelog.versions_list) == 1:
6767
last_version = changelog.versions_list[0]
@@ -101,7 +101,6 @@ def changelog(ctx):
101101
"marker": "<!-- insertion marker -->",
102102
"version_regex": r"^## \[v?(?P<version>[^\]]+)",
103103
"template_url": template_url,
104-
"commit_style": "angular",
105104
},
106105
title="Updating changelog",
107106
pty=PTY,

0 commit comments

Comments
 (0)