-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathcliff.toml
More file actions
145 lines (137 loc) · 6.36 KB
/
Copy pathcliff.toml
File metadata and controls
145 lines (137 loc) · 6.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# git-cliff ~ configuration file
# https://git-cliff.org/docs/configuration
#
# Configuration for terraform-provider-rhcs
# Commit format: [JIRA-TICKET] | [TYPE][(scope)][!]: <MESSAGE>
# Supported tickets: OCM-XXXXX, ROSAENG-XXXX
# Examples:
# OCM-12345 | feat: add new feature
# OCM-12345 | feat(cluster): add new feature
# OCM-12345 | feat!: breaking change
# ROSAENG-1234 | fix: resolve authentication issue
[changelog]
# Changelog header
# Template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
{%- if version -%}
## {{ version | trim_start_matches(pat="v") }} ({{ timestamp | date(format="%d %b, %Y") }})
{%- else -%}
## [unreleased]
{%- endif -%}
{%- for group, commits in commits | group_by(attribute="group") %}
{{ group | striptags | trim | upper }}
{%- for group, commits in commits | group_by(attribute="scope") %}
{%- if not (group is containing("Ignore")) %}
* {{ group | upper_first }}
{%- for commit in commits %}
* {{ commit.message | upper_first | split(pat="\n") | first }}\
{% endfor %}
{%- else%}
{%- for commit in commits %}
* {{ commit.message | upper_first }}\n
{%- endfor -%}
{%- endif%}
{%- endfor %}
{%- endfor %}\n
"""
# Remove leading and trailing whitespaces from the changelog
trim = false
# Render body even when there are no releases to process
render_always = false
# Postprocessors for final changelog modifications
postprocessors = []
[git]
# Use conventional commits parsing to extract type and description
conventional_commits = true
# Do not filter unconventional commits
filter_unconventional = false
# Do not require conventional commits
require_conventional = false
# Do not split commits on newlines
split_commits = false
# Preprocessors to transform commit messages from our format to parseable format
# Transform: "OCM-12345 | feat(scope)!: add feature" -> "feat(scope)!: add feature"
# Transform: "ROSAENG-1234 | feat(scope)!: add feature" -> "feat(scope)!: add feature"
# (Must match hack/commit-msg-verify.sh: optional (scope) and ! before the colon.)
# This allows commit_parsers to match on type while preserving the message
commit_preprocessors = [
# JIRA-XXXX | type[(scope)][!]: body -> conventional subject for parsing
{ pattern = '^[A-Z]+-\d+\s*\|\s*(feat|fix|docs|style|refactor|perf|test|build|ci|chore)(\([a-z0-9._-]+\))?(!)?:\s*(.+)$', replace = "$1$2$3: $4" },
# Placeholder OCM-0… ticket (same shape)
{ pattern = '^OCM-0+\s*\|\s*(feat|fix|docs|style|refactor|perf|test|build|ci|chore)(\([a-z0-9._-]+\))?(!)?:\s*(.+)$', replace = "$1$2$3: $4" },
# Placeholder ROSAENG-0… ticket (same shape)
{ pattern = '^ROSAENG-0+\s*\|\s*(feat|fix|docs|style|refactor|perf|test|build|ci|chore)(\([a-z0-9._-]+\))?(!)?:\s*(.+)$', replace = "$1$2$3: $4" },
# Strip "OCM-NNNN: " or "ROSAENG-NNNN: " prefix (e.g. "OCM-3102: Fixing a bug" -> "Fixing a bug")
{ pattern = '^[A-Z]+-\d+:\s*', replace = "" },
{ pattern = '^[A-Z]+-\d+ \| \s*', replace = "" },
# Remove Signed-off-by lines (e.g. "Signed-off-by: abc <abc@abc.com>")
{ pattern = 'Signed-off-by:.*>', replace = "" },
]
# Commit parsers to group commits by type
commit_parsers = [
# Skip test commits - they're not user-facing
{ message = "^test", skip = true },
# Skip CI/CD commits - they're internal
{ message = "^ci", skip = true },
# Skip build commits - they're internal
{ message = "^build", skip = true },
# Skip anything mentioning konflux (case insensitive)
{ message = "(?i).*konflux.*", skip = true },
# Skip anything mentioning changelog (case insensitive)
{ message = "(?i).*changelog.*", skip = true },
{ message = "^chore\\(release\\)", skip = true },
{ message = "^chore\\(deps", skip = true },
# Skip single-word messages (e.g. "F", "Init", "something")
{ message = "^\\S+$", skip = true },
# Skip merge commits
{ message = "^Merge pull request", skip = true },
{ message = "^Merge branch", skip = true },
{ message = "^Merge remote-tracking branch", skip = true },
{ message = "Update README.md", skip = true},
# Commits to be added to Changelog
# <!-- 1 --> entries are used to force an order
# Setting scope as a way to create subcategories
{ message = "^feat", group = "<!-- 1 -->FEATURES:", default_scope="Ignore scope"},
{ message = "^fix", group = "<!-- 2 -->ENHANCEMENTS:", default_scope="Bug fixes"},
{ message = "^docs", group = "<!-- 2 -->ENHANCEMENTS:", default_scope="Documentation"},
{ message = "^perf", group = "<!-- 2 -->ENHANCEMENTS:", default_scope="Chores"},
{ message = "^refactor", group = "<!-- 2 -->ENHANCEMENTS:", default_scope="Chores"},
{ message = "^style", group = "<!-- 2 -->ENHANCEMENTS:", default_scope="Chores"},
{ message = "^chore", group = "<!-- 2 -->ENHANCEMENTS:", default_scope="Chores"},
{ body = ".*security", group = "<!-- 4 -->SECURITY:", default_scope="Ignore scope"},
{ message = "^revert", group = "<!-- 5 -->REVERTS:", default_scope="Ignore scope"},
# Parsers for not conventional commits
{ message = "(?i).*documentation.*", group = "<!-- 2 -->ENHANCEMENTS:", default_scope="Documentation"},
{ message = "(?i)(^|.*\\s)fix(\\s|:)", group = "<!-- 2 -->ENHANCEMENTS:", default_scope="Bug fixes"},
# if no match, will be added as Other
{ message = ".*", group = "<!-- 2 -->ENHANCEMENTS:", default_scope = "Other"},
]
# Protect breaking changes from being skipped
protect_breaking_commits = false
# Filter out commits that don't match any parser
filter_commits = true
# Do not fail on unmatched commits
fail_on_unmatched_commit = false
# Link parsers for external references
link_parsers = [
# Parse JIRA ticket references (OCM and ROSAENG)
{ pattern = "OCM-(\\d+)", href = "https://issues.redhat.com/browse/OCM-$1" },
{ pattern = "ROSAENG-(\\d+)", href = "https://issues.redhat.com/browse/ROSAENG-$1" },
]
# Use tags from current branch only
use_branch_tags = false
# Regex pattern for matching git tags
tag_pattern = "v[0-9].*"
# Skip tags in output (but still process their commits)
skip_tags = ""
# Completely ignore prerelease, test, and hotfix tags (don't use them as boundaries)
ignore_tags = ".*(-prerelease\\.|-test|-hotfix).*"
# Sort tags topologically
topo_order = false
# Sort commits topologically
topo_order_commits = false
# Sort commits within groups (newest first matches existing changelog)
sort_commits = "newest"
# Do not process submodules
recurse_submodules = false