Skip to content

Commit 357ba9a

Browse files
committed
Renamed render to render_changelog for clarity
1 parent e285ea5 commit 357ba9a

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

generate_changelog/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def main(
8989

9090
# use the output pipeline to deal with the rendered change log.
9191
output_pipeline = pipeline_factory(config.output_pipeline, **config.variables)
92-
output_pipeline.run(templating.render(repository, config, starting_tag))
92+
output_pipeline.run(templating.render_changelog(repository, config, starting_tag))
9393
typer.echo("Done.")
9494
raise typer.Exit()
9595

generate_changelog/templating.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def get_pipeline_env(config: Optional[Configuration] = None):
3333
)
3434

3535

36-
def render(repository: Repo, config: Configuration, starting_tag: Optional[str] = None) -> str:
36+
def render_changelog(repository: Repo, config: Configuration, starting_tag: Optional[str] = None) -> str:
3737
"""
3838
Render the full or incremental changelog for the repository to a string.
3939

test/test_conv_commits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,6 @@ def test_conventional_commits(conv_commit_repo):
272272
config.update_from_file(config_file_path)
273273
config.template_dirs = []
274274

275-
output = templating.render(conv_commit_repo, config, None)
275+
output = templating.render_changelog(conv_commit_repo, config, None)
276276
expected = (FIXTURES_DIR / "rendered_conv_commit_repo.md").read_text()
277277
assert output.strip() == expected.strip()

test/test_templating.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def test_render(default_repo, capsys):
104104
"""Render should render the changelog."""
105105
config = configuration.get_default_config()
106106
config.template_dirs = []
107-
output = templating.render(default_repo, config, None)
107+
output = templating.render_changelog(default_repo, config, None)
108108
expected = (FIXTURES_DIR / "rendered_default_repo.md").read_text()
109109
assert output.strip() == expected.strip()
110110

@@ -113,7 +113,7 @@ def test_render_from_tag(default_repo, capsys):
113113
"""Render should render the changelog."""
114114
config = configuration.get_default_config()
115115
config.template_dirs = []
116-
output = templating.render(default_repo, config, "0.0.3")
116+
output = templating.render_changelog(default_repo, config, "0.0.3")
117117
expected = textwrap.dedent(
118118
"""
119119
# Changelog
@@ -133,7 +133,7 @@ def test_incremental_context(default_repo, capsys):
133133
"""Make sure the incremental changelog includes the previous version."""
134134
config = configuration.get_default_config()
135135
config.template_dirs = [FIXTURES_DIR / "templates"]
136-
output = templating.render(default_repo, config, "0.0.2")
136+
output = templating.render_changelog(default_repo, config, "0.0.2")
137137
expected = textwrap.dedent(
138138
"""
139139
# Changelog

0 commit comments

Comments
 (0)