|
| 1 | +# git-cliff configuration file |
| 2 | +# https://git-cliff.org/docs/configuration |
| 3 | + |
| 4 | +[changelog] |
| 5 | +# Changelog header |
| 6 | +header = """ |
| 7 | +# Changelog |
| 8 | +
|
| 9 | +All notable changes to this project will be documented in this file. |
| 10 | +
|
| 11 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 12 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n |
| 13 | +""" |
| 14 | + |
| 15 | +# Template for changelog body |
| 16 | +body = """ |
| 17 | +{% if version %}\ |
| 18 | + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} |
| 19 | +{% else %}\ |
| 20 | + ## [Unreleased] |
| 21 | +{% endif %}\ |
| 22 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 23 | + ### {{ group | striptags | trim | upper_first }} |
| 24 | + {% for commit in commits %} |
| 25 | + - {{ commit.message | upper_first }} |
| 26 | + {% endfor %} |
| 27 | +{% endfor %}\n |
| 28 | +""" |
| 29 | + |
| 30 | +# Template for changelog footer |
| 31 | +footer = """ |
| 32 | +<!-- generated by git-cliff --> |
| 33 | +""" |
| 34 | + |
| 35 | +# Remove the leading and trailing whitespace from the template |
| 36 | +trim = true |
| 37 | + |
| 38 | +[git] |
| 39 | +# Parse commits based on https://www.conventionalcommits.org |
| 40 | +conventional_commits = false |
| 41 | +# Filter unconventional commits |
| 42 | +filter_unconventional = false |
| 43 | +# Split the commit message by pattern |
| 44 | +split_commits = false |
| 45 | + |
| 46 | +# Regex for preprocessing commit messages |
| 47 | +commit_preprocessors = [ |
| 48 | + # Transform "#123 type: description" to "type: description (#123)" |
| 49 | + { pattern = '^#(\d+)\s+(.+)$', replace = "${2} (#${1})" }, |
| 50 | +] |
| 51 | + |
| 52 | +# Regex for parsing commit messages |
| 53 | +commit_parsers = [ |
| 54 | + { message = "^feat", group = "Added" }, |
| 55 | + { message = "^add", group = "Added" }, |
| 56 | + { message = "^fix", group = "Fixed" }, |
| 57 | + { message = "^perf", group = "Changed" }, |
| 58 | + { message = "^refactor", group = "Changed" }, |
| 59 | + { message = "^docs", group = "Changed" }, |
| 60 | + { message = "^test", group = "Changed" }, |
| 61 | + { message = "^chore\\(release\\): prepare for", skip = true }, |
| 62 | + { message = "^chore\\(deps.*\\)", skip = true }, |
| 63 | + { message = "^chore\\(pr\\)", skip = true }, |
| 64 | + { message = "^chore\\(pull\\)", skip = true }, |
| 65 | + { message = "^chore: bump version", skip = true }, |
| 66 | + { message = "^Merge pull request", skip = true }, |
| 67 | + { message = "^Merge branch", skip = true }, |
| 68 | + { message = "^deps\\(", skip = true }, |
| 69 | + { message = "^ci", skip = true }, |
| 70 | + { body = ".*security", group = "Security" }, |
| 71 | + { message = "^revert", group = "Reverted" }, |
| 72 | +] |
| 73 | + |
| 74 | +# Protect breaking changes from being skipped due to matching a skipping commit_parser |
| 75 | +protect_breaking_commits = false |
| 76 | + |
| 77 | +# Filter out commits that match the specified patterns |
| 78 | +filter_commits = false |
| 79 | + |
| 80 | +# Glob pattern for matching git tags |
| 81 | +tag_pattern = "v[0-9].*" |
| 82 | + |
| 83 | +# Sort tags chronologically |
| 84 | +date_order = false |
| 85 | +sort_commits = "oldest" |
| 86 | + |
| 87 | +# Link parsers for extracting external references |
| 88 | +link_parsers = [ |
| 89 | + { pattern = "\\(#(\\d+)\\)", href = "https://github.com/RAprogramm/telegram-webapp-sdk/issues/$1", text = "#$1" }, |
| 90 | +] |
0 commit comments