[
{
"version": null,
"message": null,
"commits": [
{
"id": "35f070aab8e1a5c44f6ff3741e6def4d432f6c0c",
"message": "fix something",
"body": null,
"footers": [
{
"token": "BREAKING CHANGE",
"separator": ":",
"value": "This fix is breaking.",
"breaking": true
}
],
"group": "<!-- 3 -->Removed",
"breaking_description": "This fix is breaking.",
"breaking": true,
"scope": null,
"links": [],
"author": {
"name": "<REDACTED>",
"email": "<REDACTED>",
"timestamp": 1787345381
},
"committer": {
"name": "<REDACTED>",
"email": "<REDACTED>",
"timestamp": 1787345459
},
"conventional": true,
"merge_commit": false,
"statistics": {
"files_changed": 0,
"additions": 0,
"deletions": 0
},
"extra": null,
"github": {
"username": null,
"pr_title": null,
"pr_number": null,
"pr_labels": [],
"is_first_time": false
},
"gitlab": {
"username": null,
"pr_title": null,
"pr_number": null,
"pr_labels": [],
"is_first_time": false
},
"gitea": {
"username": null,
"pr_title": null,
"pr_number": null,
"pr_labels": [],
"is_first_time": false
},
"bitbucket": {
"username": null,
"pr_title": null,
"pr_number": null,
"pr_labels": [],
"is_first_time": false
},
"azure_devops": {
"username": null,
"pr_title": null,
"pr_number": null,
"pr_labels": [],
"is_first_time": false
},
"raw_message": "fix: fix something\n\nBREAKING CHANGE: This fix is breaking."
}
],
"commit_id": "35f070aab8e1a5c44f6ff3741e6def4d432f6c0c",
"timestamp": null,
"previous": null,
"repository": "<REDACTED>",
"commit_range": {
"from": "35f070aab8e1a5c44f6ff3741e6def4d432f6c0c",
"to": "35f070aab8e1a5c44f6ff3741e6def4d432f6c0c"
},
"submodule_commits": {},
"statistics": {
"commit_count": 1,
"conventional_commit_count": 1,
"links": []
},
"extra": null,
"bump_type": null,
"github": {
"contributors": []
},
"gitlab": {
"contributors": []
},
"gitea": {
"contributors": []
},
"bitbucket": {
"contributors": []
},
"azure_devops": {
"contributors": []
}
}
]
Is there an existing issue for this?
Description of the bug
I was trying to configure commit parsers that map conventional commits to a "Keep a Changelog" style changelog. One parser is intended to match
feat:commits containing keywords like "remove" in conjunction with aBREAKING CHANGEfooter and map matching commits to theRemovedsection. But it turns out that any commits containing aBREAKING CHANGEfooter are now mapped to theRemovedsection. It seems that the fields in the same commit parser are matched disjunctively, i.e. if any one of those field regexes matches, the parser matches. I was expecting that all field regexes need to match for the parser to match, i.e. I was expecting a conjunctive relationship between the field regexes.Steps To Reproduce
Create an (empty) commit with the following commit message:
Create
cliff.tomlwith the following content:Run the following command:
Inspect the printed git-cliff context and observe that the commit message is mapped to the
Removedgroup.git-cliff context
[ { "version": null, "message": null, "commits": [ { "id": "35f070aab8e1a5c44f6ff3741e6def4d432f6c0c", "message": "fix something", "body": null, "footers": [ { "token": "BREAKING CHANGE", "separator": ":", "value": "This fix is breaking.", "breaking": true } ], "group": "<!-- 3 -->Removed", "breaking_description": "This fix is breaking.", "breaking": true, "scope": null, "links": [], "author": { "name": "<REDACTED>", "email": "<REDACTED>", "timestamp": 1787345381 }, "committer": { "name": "<REDACTED>", "email": "<REDACTED>", "timestamp": 1787345459 }, "conventional": true, "merge_commit": false, "statistics": { "files_changed": 0, "additions": 0, "deletions": 0 }, "extra": null, "github": { "username": null, "pr_title": null, "pr_number": null, "pr_labels": [], "is_first_time": false }, "gitlab": { "username": null, "pr_title": null, "pr_number": null, "pr_labels": [], "is_first_time": false }, "gitea": { "username": null, "pr_title": null, "pr_number": null, "pr_labels": [], "is_first_time": false }, "bitbucket": { "username": null, "pr_title": null, "pr_number": null, "pr_labels": [], "is_first_time": false }, "azure_devops": { "username": null, "pr_title": null, "pr_number": null, "pr_labels": [], "is_first_time": false }, "raw_message": "fix: fix something\n\nBREAKING CHANGE: This fix is breaking." } ], "commit_id": "35f070aab8e1a5c44f6ff3741e6def4d432f6c0c", "timestamp": null, "previous": null, "repository": "<REDACTED>", "commit_range": { "from": "35f070aab8e1a5c44f6ff3741e6def4d432f6c0c", "to": "35f070aab8e1a5c44f6ff3741e6def4d432f6c0c" }, "submodule_commits": {}, "statistics": { "commit_count": 1, "conventional_commit_count": 1, "links": [] }, "extra": null, "bump_type": null, "github": { "contributors": [] }, "gitlab": { "contributors": [] }, "gitea": { "contributors": [] }, "bitbucket": { "contributors": [] }, "azure_devops": { "contributors": [] } } ]Expected behavior
The commit should have been mapped to the
Fixedgroup because I believe it's more intuitive to treat the field regexes of a commit parser as conjunctive.Screenshots / Logs
No response
Software information
Additional context
No response