|
| 1 | +# configuration file for git-cliff (0.1.0) |
| 2 | + |
| 3 | +[changelog] |
| 4 | +# changelog header |
| 5 | +header = """ |
| 6 | +<!-- |
| 7 | +Usage: |
| 8 | +
|
| 9 | +Change log entries are generated by git cliff ref: https://github.com/orhun/git-cliff |
| 10 | +This can be run using "make changelog tag=vx.y.z" |
| 11 | +
|
| 12 | +Each commit should be conventional, the following message groups are supported. |
| 13 | +
|
| 14 | +* feat, feature |
| 15 | +* imp |
| 16 | +* bug, fix |
| 17 | +* deprecated |
| 18 | +* (api)! |
| 19 | +* (statemachine)! |
| 20 | +
|
| 21 | +Types of changes (Stanzas): |
| 22 | +
|
| 23 | +"Features" for new features. (feat, feature) |
| 24 | +"Improvements" for changes in existing functionality. (imp) |
| 25 | +"Deprecated" for soon-to-be removed features. |
| 26 | +"Bug Fixes" for any bug fixes. (bug, fix) |
| 27 | +"API Breaking" for breaking exported APIs used by developers building on SDK. Add (api)! e.g. fix(api)!: api breaking fix |
| 28 | +"State Machine Breaking" for any changes that result in a different AppState given the same genesisState and txList. Add (statemachine)! e.g. fix(statemachine)!: state machine breaking fix |
| 29 | +Ref: https://keepachangelog.com/en/1.0.0/ |
| 30 | +--> |
| 31 | +
|
| 32 | +# Changelog |
| 33 | +All notable changes to this project will be documented in this file. |
| 34 | +""" |
| 35 | +# template for the changelog body |
| 36 | +# https://tera.netlify.app/docs/#introduction |
| 37 | +body = """ |
| 38 | +{% if version %}\ |
| 39 | + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} |
| 40 | +{% else %}\ |
| 41 | + ## [unreleased] |
| 42 | +{% endif %}\ |
| 43 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 44 | + ### {{ group | striptags | trim | upper_first }} |
| 45 | + {% for commit in commits %} |
| 46 | + * {{ commit.message | upper_first }}\ |
| 47 | + {% endfor %} |
| 48 | +{% endfor %}\n |
| 49 | +""" |
| 50 | +# remove the leading and trailing whitespace from the template |
| 51 | +trim = true |
| 52 | +# changelog footer |
| 53 | +footer = """ |
| 54 | +<!-- generated by git-cliff --> |
| 55 | +""" |
| 56 | + |
| 57 | +[git] |
| 58 | +# parse the commits based on https://www.conventionalcommits.org |
| 59 | +conventional_commits = true |
| 60 | +# filter out the commits that are not conventional |
| 61 | +filter_unconventional = true |
| 62 | +# process each line of a commit as an individual commit |
| 63 | +split_commits = true |
| 64 | +# regex for preprocessing the commit messages |
| 65 | +commit_preprocessors = [ |
| 66 | + # A reference to an issue is appened to commits that looks like "(#1234)", this will be replaced |
| 67 | + # with a link to that issue, e.g. "[#$1234](https://github.com/cosmos/ibc-go/issues/1234)". |
| 68 | + { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/cosmos/ibc-go/issues/${2}))" }, |
| 69 | + # any reference to a pr like "pr-1234" will be replaced with a link to the PR. |
| 70 | + { pattern = '\(pr-([0-9]+)\)', replace = "([#${1}](https://github.com/cosmos/ibc-go/pulls/${1}))" }, |
| 71 | + |
| 72 | + # the following patterns only exist because "split_commits" is set to true, and we are processesing |
| 73 | + # each line of the commit as a separate message. |
| 74 | + # these exist to filter out common messages that appear in commit messages that are technically |
| 75 | + # conventional, but we do not way to include in the changelog. |
| 76 | + { pattern = '^Signed-off-by:.*', replace='' }, |
| 77 | + { pattern = '^Co-authored-by:.*', replace='' }, |
| 78 | + # don't include references to issues as changelog entries. |
| 79 | + { pattern = '^ref:.*', replace='' }, |
| 80 | + # exclude CVSS format, CVE can still be included in regular conventinal commits. |
| 81 | + { pattern = 'CVSS:.*', replace='' }, |
| 82 | + # don't include dependabot auto merge entries. |
| 83 | + { pattern = '.*dependabot-automerge-.*', replace='' }, |
| 84 | + # don't include statements saying which issue is closed. |
| 85 | + { pattern = '^closes:.*', replace='' }, |
| 86 | + # remove standalone links in the commit messages. |
| 87 | + { pattern = '^https://.*', replace='' }, |
| 88 | + # remove lines with html. |
| 89 | + { pattern = '^<.*', replace='' }, |
| 90 | +] |
| 91 | + |
| 92 | +# regex for parsing and grouping commits |
| 93 | +commit_parsers = [ |
| 94 | + # specifying the number in a comment is a workaround to enable ordering of groups. |
| 95 | + # these comments are stripped out of the markdown with the filter "{{ group | striptags | trim | upper_first }}" |
| 96 | + # above in the body template. |
| 97 | + { message = "^((?i)deps|(?i)dep|(?i)build)", group = "<!-- 0 -->Dependencies" }, |
| 98 | + { message = '^.*\(api\)!', group = "<!-- 1 -->API Breaking" }, |
| 99 | + { message = '^.*\(statemachine\)!', group = "<!-- 2 -->State Machine Breaking" }, |
| 100 | + { message = "^((?i)improvements|(?i)imp)", group = "<!-- 3 -->Improvements" }, |
| 101 | + { message = "^((?i)feature|(?i)feat)", group = "<!-- 4 -->Features" }, |
| 102 | + { message = "^((?i)fix|(?i)bug)", group = "<!-- 5 -->Bug Fixes" }, |
| 103 | + { message = "^((?i)doc|(?i)docs|(?i)documentation)", group = "<!-- 6 -->Documentation" }, |
| 104 | + { message = "^((?i)test|(?i)e2e)", group = "<!-- 7 -->Testing" }, |
| 105 | + { message = "^((?i)deprecated)", group = "<!-- 8 -->Deprecated" }, |
| 106 | + { message = "^((?i)chore|(?i)misc|(?i)nit)", group = "<!-- 9 -->Miscellaneous Tasks" }, |
| 107 | +] |
| 108 | +# filter out the commits that are not matched by commit parsers |
| 109 | +filter_commits = false |
| 110 | +# glob pattern for matching git tags |
| 111 | +tag_pattern = "v[0-9]*" |
| 112 | +# regex for skipping tags |
| 113 | +skip_tags = "" |
| 114 | +# regex for ignoring tags |
| 115 | +ignore_tags = "" |
| 116 | +# sort the tags chronologically |
| 117 | +date_order = false |
| 118 | +# sort the commits inside sections by oldest/newest order |
| 119 | +sort_commits = "oldest" |
0 commit comments