File tree Expand file tree Collapse file tree
fixtures/test-override-scope Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # git-cliff ~ configuration file
2+ # https://git-cliff.org/docs/configuration
3+
4+ [changelog ]
5+ # A Tera template to be rendered for each release in the changelog.
6+ # See https://keats.github.io/tera/docs/#introduction
7+ body = """
8+ {% if version %}\
9+ ## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
10+ {% else %}\
11+ ## Unreleased
12+ {% endif %}\
13+ {% for group, commits in commits | group_by(attribute="group") %}
14+ ### {{ group | upper_first }}
15+ {% for group, commits in commits | group_by(attribute="scope") %}
16+ #### {{ group | upper_first }}
17+ {% for commit in commits %}
18+ - {{ commit.message | upper_first }}\
19+ {% endfor %}
20+ {% endfor %}\
21+ {% endfor %}\n
22+ """
23+
24+ [git ]
25+ conventional_commits = true
26+ filter_unconventional = false
27+ # An array of regex based parsers for extracting data from the commit message.
28+ # Assigns commits to groups.
29+ # Optionally sets the commit's `scope` and can decide to exclude commits from further processing.
30+ commit_parsers = [
31+ { message = " ([Xx]enon)" , scope = " Xenon" }
32+ ]
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -e
3+
4+ GIT_COMMITTER_DATE=" 2022-04-06 01:25:08" git commit --allow-empty -m " Initial commit"
5+ GIT_COMMITTER_DATE=" 2022-04-06 01:25:09" git commit --allow-empty -m " fix(Xenon): first commit"
6+ GIT_COMMITTER_DATE=" 2022-04-06 01:25:10" git commit --allow-empty -m " fix(Xenon): second commit"
7+ GIT_COMMITTER_DATE=" 2022-04-06 01:25:10" git commit --allow-empty -m " fix(xenon): third commit"
8+ git tag v0.1.0
Original file line number Diff line number Diff line change 1+ # Changelog
2+
3+ All notable changes to this project will be documented in this file.
4+
5+ ## 0.1.0 - 2022-04-06
6+
7+ ### Fix
8+
9+ #### Xenon
10+
11+ - First commit
12+ - Second commit
13+ - Third commit
14+
15+ <!-- generated by git-cliff -->
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ jobs:
128128 - fixtures-name : test-commit-range-with-sort-commits
129129 - fixtures-name : test-commit-range-with-given-range
130130 command : a140cef^..a9d4050 --ignore-tags "."
131+ - fixtures-name : test-override-scope
131132
132133 steps :
133134 - name : Checkout
You can’t perform that action at this time.
0 commit comments