github.com/cosmos/cosmos-sdk@v0.50.10/cliff.toml (about)

     1  # configuration file for git-cliff (0.1.0)
     2  
     3  [changelog]
     4  # changelog header
     5  header = """
     6  <!--
     7  Guiding Principles:
     8  
     9  Changelogs are for humans, not machines.
    10  There should be an entry for every single version.
    11  The same types of changes should be grouped.
    12  Versions and sections should be linkable.
    13  The latest version comes first.
    14  The release date of each version is displayed.
    15  Mention whether you follow Semantic Versioning.
    16  
    17  Usage:
    18  
    19  Changelog entries are generated by git cliff ref: https://github.com/orhun/git-cliff
    20  
    21  Each commit should be conventional, the following message groups are supported.
    22  
    23  * feat: A new feature
    24  * fix: A bug fix
    25  * docs: Documentation only changes
    26  * style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
    27  * refactor: A code change that neither fixes a bug nor adds a feature
    28  * perf: A code change that improves performance
    29  * test: Adding missing tests or correcting existing tests
    30  * build: Changes that affect the build system or external dependencies (example scopes: go, npm)
    31  * ci: Changes to our CI configuration files and scripts (example scopes: GH Actions)
    32  * chore: Other changes that don't modify src or test files
    33  * revert: Reverts a previous commit
    34  
    35  When a change is made that affects the API or state machine, the commit message prefix should be suffixed with `!`.
    36  
    37  Ref: https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json
    38  -->
    39  
    40  # Changelog
    41  
    42  """
    43  # template for the changelog body
    44  body = """
    45  {% if version %}\
    46      ## [{{ version }}](https://github.com/cosmos/cosmos-sdk/releases/tag/{{version}}) - {{ timestamp | date(format="%Y-%m-%d") }}
    47  {% else %}\
    48      ## [Unreleased]
    49  {% endif %}\
    50  {% for group, commits in commits | group_by(attribute="group") %}
    51      ### {{ group | striptags | trim | upper_first }}
    52      {% for commit in commits %}
    53          * {{ commit.message | upper_first }}\
    54      {% endfor %}
    55  {% endfor %}\n
    56  """
    57  # remove the leading and trailing whitespace from the template
    58  trim = true
    59  # changelog footer
    60  footer = """
    61  <!-- generated by git-cliff -->
    62  """
    63  
    64  [git]
    65  # parse the commits based on https://www.conventionalcommits.org
    66  conventional_commits = true
    67  # filter out the commits that are not conventional
    68  filter_unconventional = true
    69  # process each line of a commit as an individual commit
    70  split_commits = true
    71  # regex for preprocessing the commit messages
    72  commit_preprocessors = [
    73      { pattern = '.*', replace_command = 'sed -E "s/^(\S+)\s(.+)\s\((#[0-9]+)\)$/\1 (\3) \2/"' },
    74      # A reference to an issue is appened to commits that looks like "(#1234)", this will be replaced
    75      # with a link to that issue, e.g. "[#$1234](https://github.com/cosmos/cosmos-sdk/issues/1234)".
    76      { pattern = '\(#(\d+)\)', replace = "[#${1}](https://github.com/cosmos/cosmos-sdk/issues/${1})" },
    77      # replace multiple spaces with one space
    78      { pattern = "  +", replace = " "},
    79  
    80      # the following patterns only exist because "split_commits" is set to true, and we are processesing
    81      # each line of the commit as a separate message.
    82      # these exist to filter out common messages that appear in commit messages that are technically
    83      # conventional, but we do not way to include in the changelog.
    84      { pattern = '^Signed-off-by:.*', replace='' },
    85      { pattern = '^Co-authored-by:.*', replace='' },
    86      # don't include references to issues as changelog entries.
    87      { pattern = '^ref:.*', replace='' },
    88      # exclude CVSS format, CVE can still be included in regular conventinal commits.
    89      { pattern = 'CVSS:.*', replace='' },
    90      # don't include dependabot auto merge entries.
    91      { pattern = '.*dependabot-automerge-.*', replace='' },
    92      # don't include statements saying which issue is closed.
    93      { pattern = '^closes:.*|Closes:.*', replace='' },
    94      # remove standalone links in the commit messages.
    95      { pattern = '^https://.*', replace='' },
    96      # remove lines with html.
    97      { pattern = '^<.*', replace='' },
    98  ]
    99  
   100  # regex for parsing and grouping commits
   101  commit_parsers = [
   102      # specifying the number in a comment is a workaround to enable ordering of groups.
   103      # these comments are stripped out of the markdown with the filter "{{ group | striptags | trim | upper_first }}"
   104      # above in the body template.
   105      { message = "^((?i)feature|(?i)feat)", group = "<!-- 0 -->Features" },
   106      { message = "^((?i)improvements|(?i)imp|(?i)impr|(?i)perf)", group = "<!-- 1 -->Improvements" },
   107      { message = "^((?i)fix|(?i)bug)", group = "<!-- 2 -->Bug Fixes" },
   108      { message = '^.*\(api\)!', group = "<!-- 3 -->API Breaking" },
   109      { message = '^.*\(statemachine\)!', group = "<!-- 4 -->State Machine Breaking" },
   110      { message = "^((?i)test)", group = "<!-- 5 -->Testing" },
   111      { message = "^((?i)doc|(?i)docs|(?i)documentation)", group = "<!-- 6 -->Documentation" },
   112      { message = "^((?i)deprecated)", group = "<!-- 7 -->Deprecated" },
   113      { message = "^((?i)deps|(?i)dep|(?i)build)", group = "<!-- 8 -->Dependencies" },
   114      { message = "^revert|^ci|^chore|^refactor", skip = true} # explicitly skips changelog for reverts, CI, chore and refactor commits
   115  ]
   116  # filter out the commits that are not matched by commit parsers
   117  filter_commits = true
   118  # glob pattern for matching git tags
   119  # note SDK tags are purposely ignored, only submodules are included.
   120  tag_pattern = "**/v[0-9]*"
   121  # regex for skipping tags
   122  skip_tags = ""
   123  # regex for ignoring tags
   124  ignore_tags = ""
   125  # sort the tags chronologically
   126  date_order = false
   127  # sort the commits inside sections by oldest/newest order
   128  sort_commits = "newest"