Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on: # yamllint disable-line rule:truthy
permissions:
contents: write
id-token: write
pull-requests: read
jobs:
release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -34,6 +35,8 @@ jobs:
id: git-cliff
# yamllint disable-line rule:line-length
uses: orhun/git-cliff-action@f50e11560dce63f7c33227798f90b924471a88b5 # ratchet:orhun/git-cliff-action@v4.8.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --current
- name: Create GitHub Release
Expand Down
56 changes: 56 additions & 0 deletions cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[changelog]
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }} \
([`{{ commit.id | truncate(length=7, end="") }}`]\
(https://github.com/benner/commit-guard/commit/{{ commit.id }}))\
{% endfor %}
{% endfor %}
{%- if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}

### New Contributors
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
- @{{ contributor.username }} made their first contribution\
{% if contributor.pr_number %} in \
[#{{ contributor.pr_number }}]\
(https://github.com/benner/commit-guard/pull/{{ contributor.pr_number }})\
{% endif %}
{% endfor %}
{%- endif %}
"""
trim = true

[remote.github]
owner = "benner"
repo = "commit-guard"

[git]
conventional_commits = true
filter_unconventional = true
split_commits = false
protect_breaking_commits = false
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^perf", group = "<!-- 2 -->⚡ Performance" },
{ message = "^refactor", group = "<!-- 3 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 4 -->🎨 Styling" },
{ message = "^test", group = "<!-- 5 -->🧪 Testing" },
{ message = "^docs", skip = true },
{ message = "^ci", skip = true },
{ message = "^chore", group = "<!-- 6 -->⚙️ Miscellaneous Tasks" },
{ message = "^revert", group = "<!-- 7 -->◀️ Revert" },
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
]
filter_commits = true
topo_order = false
sort_commits = "oldest"
Loading