Skip to content

Commit 9e4bd07

Browse files
Cyclonitorhun
andauthored
refactor(config): initialize config structs with default values (#1090)
* refactor: default to embeded config * docs: add comment about config source order * fix(fixtures): adapt existing fixtures for new default configuration * refactor(config): remove redundant default configuration values from fixtures --------- Co-authored-by: Orhun Parmaksız <[email protected]>
1 parent cdce20f commit 9e4bd07

File tree

85 files changed

+227
-940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+227
-940
lines changed

.github/fixtures/new-fixture-template/cliff.toml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
# https://git-cliff.org/docs/configuration
33

44
[changelog]
5-
# A Tera template to be rendered as the changelog's header.
6-
# See https://keats.github.io/tera/docs/#introduction
7-
header = """
8-
# Changelog\n
9-
All notable changes to this project will be documented in this file.\n
10-
"""
115
# A Tera template to be rendered for each release in the changelog.
126
# See https://keats.github.io/tera/docs/#introduction
137
body = """
@@ -23,13 +17,6 @@ body = """
2317
{% endfor %}
2418
{% endfor %}\n
2519
"""
26-
# A Tera template to be rendered as the changelog's footer.
27-
# See https://keats.github.io/tera/docs/#introduction
28-
footer = """
29-
<!-- generated by git-cliff -->
30-
"""
31-
# Remove leading and trailing whitespaces from the changelog's body.
32-
trim = true
3320

3421
[git]
3522
# An array of regex based parsers for extracting data from the commit message.

.github/fixtures/test-always-render-unreleased/cliff.toml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
[changelog]
2-
# template for the changelog footer
3-
header = """
4-
# Changelog\n
5-
All notable changes to this project will be documented in this file.\n
6-
"""
72
# template for the changelog body
83
# https://keats.github.io/tera/docs/#introduction
94
body = """
@@ -23,11 +18,6 @@ No significant changes.
2318
{% endfor %}
2419
{%- endif %}
2520
"""
26-
# template for the changelog footer
27-
footer = """
28-
<!-- generated by git-cliff -->
29-
"""
30-
# remove the leading and trailing whitespace from the templates
31-
trim = true
21+
3222
# render body even when there are no releases to process
3323
render_always = true

.github/fixtures/test-always-render/cliff.toml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
[changelog]
2-
# template for the changelog footer
3-
header = """
4-
# Changelog\n
5-
All notable changes to this project will be documented in this file.\n
6-
"""
72
# template for the changelog body
83
# https://keats.github.io/tera/docs/#introduction
94
body = """
@@ -23,11 +18,5 @@ No significant changes.
2318
{% endfor %}
2419
{%- endif %}
2520
"""
26-
# template for the changelog footer
27-
footer = """
28-
<!-- generated by git-cliff -->
29-
"""
30-
# remove the leading and trailing whitespace from the templates
31-
trim = true
3221
# render body even when there are no releases to process
3322
render_always = true

.github/fixtures/test-bitbucket-integration/cliff.toml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,15 @@ body = """
3636
{%- endfor -%}
3737
{% raw %}\n\n{% endraw -%}
3838
"""
39-
# Remove leading and trailing whitespaces from the changelog's body.
40-
trim = true
41-
# A Tera template to be rendered as the changelog's footer.
42-
# See https://keats.github.io/tera/docs/#introduction
43-
footer = """
44-
<!-- generated by -cliff -->
45-
"""
4639

4740
[git]
4841
# Parse commits according to the conventional commits specification.
4942
# See https://www.conventionalcommits.org
5043
conventional_commits = false
5144
# Exclude commits that do not match the conventional commits specification.
5245
filter_unconventional = true
53-
# Split commits on newlines, treating each line as an individual commit.
54-
split_commits = false
5546
# An array of regex based parsers to modify commit messages prior to further processing.
5647
commit_preprocessors = [
5748
# Remove issue numbers.
5849
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
5950
]
60-
# Prevent commits that are breaking from being excluded by commit parsers.
61-
protect_breaking_commits = false

.github/fixtures/test-bitbucket-integration/expected.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
15
## What's Changed
26
* feat(config): support multiple file formats by @orhun <[email protected]>
37
* feat(cache): use cache while fetching pages by @orhun <[email protected]>
@@ -17,4 +21,4 @@
1721
### New Contributors
1822
* @orhun <[email protected]> made their first contribution
1923

20-
<!-- generated by -cliff -->
24+
<!-- generated by git-cliff -->

.github/fixtures/test-bump-initial-tag-cli-arg/cliff.toml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
# https://git-cliff.org/docs/configuration
33

44
[changelog]
5-
# A Tera template to be rendered as the changelog's header.
6-
# See https://keats.github.io/tera/docs/#introduction
7-
header = """
8-
# Changelog\n
9-
All notable changes to this project will be documented in this file.\n
10-
"""
115
# A Tera template to be rendered for each release in the changelog.
126
# See https://keats.github.io/tera/docs/#introduction
137
body = """
@@ -23,13 +17,6 @@ body = """
2317
{% endfor %}
2418
{% endfor %}\n
2519
"""
26-
# A Tera template to be rendered as the changelog's footer.
27-
# See https://keats.github.io/tera/docs/#introduction
28-
footer = """
29-
<!-- generated by git-cliff -->
30-
"""
31-
# Remove leading and trailing whitespaces from the changelog's body.
32-
trim = true
3320

3421
[git]
3522
# An array of regex based parsers for extracting data from the commit message.

.github/fixtures/test-bump-initial-tag-default/cliff.toml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
# https://git-cliff.org/docs/configuration
33

44
[changelog]
5-
# A Tera template to be rendered as the changelog's header.
6-
# See https://keats.github.io/tera/docs/#introduction
7-
header = """
8-
# Changelog\n
9-
All notable changes to this project will be documented in this file.\n
10-
"""
115
# A Tera template to be rendered for each release in the changelog.
126
# See https://keats.github.io/tera/docs/#introduction
137
body = """
@@ -23,13 +17,6 @@ body = """
2317
{% endfor %}
2418
{% endfor %}\n
2519
"""
26-
# A Tera template to be rendered as the changelog's footer.
27-
# See https://keats.github.io/tera/docs/#introduction
28-
footer = """
29-
<!-- generated by git-cliff -->
30-
"""
31-
# Remove leading and trailing whitespaces from the changelog's body.
32-
trim = true
3320

3421
[git]
3522
# An array of regex based parsers for extracting data from the commit message.

.github/fixtures/test-bump-initial-tag/cliff.toml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
# https://git-cliff.org/docs/configuration
33

44
[changelog]
5-
# A Tera template to be rendered as the changelog's header.
6-
# See https://keats.github.io/tera/docs/#introduction
7-
header = """
8-
# Changelog\n
9-
All notable changes to this project will be documented in this file.\n
10-
"""
115
# A Tera template to be rendered for each release in the changelog.
126
# See https://keats.github.io/tera/docs/#introduction
137
body = """
@@ -23,13 +17,6 @@ body = """
2317
{% endfor %}
2418
{% endfor %}\n
2519
"""
26-
# A Tera template to be rendered as the changelog's footer.
27-
# See https://keats.github.io/tera/docs/#introduction
28-
footer = """
29-
<!-- generated by git-cliff -->
30-
"""
31-
# Remove leading and trailing whitespaces from the changelog's body.
32-
trim = true
3320

3421
[git]
3522
# An array of regex based parsers for extracting data from the commit message.

.github/fixtures/test-bump-unreleased-with-tag-message-arg/cliff.toml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
[changelog]
2-
# template for the changelog footer
3-
header = """
4-
# Changelog\n
5-
All notable changes to this project will be documented in this file.\n
6-
"""
72
# template for the changelog body
83
# https://keats.github.io/tera/docs/#introduction
94
body = """
@@ -22,12 +17,6 @@ body = """
2217
{% endfor %}
2318
{% endfor %}\n
2419
"""
25-
# template for the changelog footer
26-
footer = """
27-
<!-- generated by git-cliff -->
28-
"""
29-
# remove the leading and trailing whitespace from the templates
30-
trim = true
3120

3221
[git]
3322
# regex for parsing and grouping commits

.github/fixtures/test-bump-version-custom-minor/cliff.toml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
[changelog]
2-
# template for the changelog footer
3-
header = """
4-
# Changelog\n
5-
All notable changes to this project will be documented in this file.\n
6-
"""
72
# template for the changelog body
83
# https://keats.github.io/tera/docs/#introduction
94
body = """
@@ -19,12 +14,6 @@ body = """
1914
{% endfor %}
2015
{% endfor %}\n
2116
"""
22-
# template for the changelog footer
23-
footer = """
24-
<!-- generated by git-cliff -->
25-
"""
26-
# remove the leading and trailing whitespace from the templates
27-
trim = true
2817

2918
[bump]
3019
features_always_bump_minor = true

0 commit comments

Comments
 (0)