|
| 1 | +#:schema https://json.schemastore.org/any.json |
| 2 | +# git-cliff ~ default configuration file |
| 3 | +# https://git-cliff.org/docs/configuration |
| 4 | + |
| 5 | +[changelog] |
| 6 | +# template for the changelog header |
| 7 | +header = """ |
| 8 | +# Pact Python CLI Changelog |
| 9 | +
|
| 10 | +All notable changes to this project will be documented in this file. |
| 11 | +
|
| 12 | +Note that this _only_ includes changes to the Python re-packaging of the Pact CLI. For changes to the Pact CLI itself, see the [Pact CLI changelog](https://github.com/pact-foundation/pact-ruby-standalone/blob/master/CHANGELOG.md). |
| 13 | +
|
| 14 | +<!-- markdownlint-disable no-duplicate-heading --> |
| 15 | +<!-- markdownlint-disable emph-style --> |
| 16 | +<!-- markdownlint-disable strong-style --> |
| 17 | +
|
| 18 | +""" |
| 19 | + |
| 20 | +# template for the changelog body |
| 21 | +# https://keats.github.io/tera/docs/#introduction |
| 22 | +body = """ |
| 23 | +{% if version %}\ |
| 24 | + ## [{{ version | trim_start_matches(pat="v") }}] _{{ timestamp | date(format="%Y-%m-%d") }}_ |
| 25 | +{% else %}\ |
| 26 | + ## [unreleased] |
| 27 | +{% endif %}\ |
| 28 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 29 | + ### {{ group | striptags | trim | upper_first }} |
| 30 | + {% for commit in commits %} |
| 31 | + - {% if commit.scope %}_({{ commit.scope }})_ {% endif %}\ |
| 32 | + {% if commit.breaking %}[**breaking**] {% endif %}\ |
| 33 | + {{ commit.message | upper_first }}\ |
| 34 | + {% if commit.breaking and commit.breaking_description %} |
| 35 | + {{ " " }}\ |
| 36 | + > {{ |
| 37 | + commit.breaking_description |
| 38 | + | split(pat="\n") |
| 39 | + | join(sep=" ") |
| 40 | + | replace(from=" ", to=" ") |
| 41 | + | replace(from=" ", to=" ") |
| 42 | + | replace(from=" ", to=" ") |
| 43 | + | upper_first |
| 44 | + }}\ |
| 45 | + {% endif %}\ |
| 46 | + {% endfor %} |
| 47 | +{% endfor %} |
| 48 | +{% if github.contributors %}\ |
| 49 | + ### Contributors |
| 50 | + {% for contributor in github.contributors %}\ |
| 51 | + {% if contributor.username and contributor.username is ending_with("[bot]") %}{% continue %}{% endif %} |
| 52 | + - @{{ contributor.username }}\ |
| 53 | + {% endfor %} |
| 54 | +{% endif %} |
| 55 | +
|
| 56 | +""" |
| 57 | + |
| 58 | +# template for the changelog footer |
| 59 | +footer = """\ |
| 60 | +<!-- generated by git-cliff on {{ now() | date(format="%Y-%m-%d") }}--> |
| 61 | +""" |
| 62 | + |
| 63 | +# remove the leading and trailing s |
| 64 | +trim = true |
| 65 | +# postprocessors |
| 66 | +postprocessors = [] |
| 67 | +# render body even when there are no releases to process |
| 68 | +# render_always = true |
| 69 | +# output file path |
| 70 | +output = "CHANGELOG.md" |
| 71 | + |
| 72 | +[git] |
| 73 | +tag_pattern = "pact-python-cli/.*" |
| 74 | +# parse the commits based on https://www.conventionalcommits.org |
| 75 | +conventional_commits = true |
| 76 | +# filter out the commits that are not conventional |
| 77 | +filter_unconventional = true |
| 78 | +# process each line of a commit as an individual commit |
| 79 | +split_commits = false |
| 80 | +# regex for preprocessing the commit messages |
| 81 | +commit_preprocessors = [ |
| 82 | + # Remove the PR number added by GitHub when merging PR in UI |
| 83 | + { pattern = '\s*\(#([0-9]+)\)$', replace = "" }, |
| 84 | + # Check spelling of the commit with https://github.com/crate-ci/typos |
| 85 | + { pattern = '.*', replace_command = 'typos --write-changes -' }, |
| 86 | +] |
| 87 | +# regex for parsing and grouping commits |
| 88 | +commit_parsers = [ |
| 89 | + # Ignore deps commits from the changelog |
| 90 | + { message = "^(chore|fix)\\(deps.*\\)", skip = true }, |
| 91 | + { message = "^chore: update changelog.*", skip = true }, |
| 92 | + # Group commits by type |
| 93 | + { group = "<!-- 00 -->🚀 Features", message = "^feat" }, |
| 94 | + { group = "<!-- 01 -->🐛 Bug Fixes", message = "^fix" }, |
| 95 | + { group = "<!-- 50 -->🚜 Refactor", message = "^refactor" }, |
| 96 | + { group = "<!-- 51 -->⚡ Performance", message = "^perf" }, |
| 97 | + { group = "<!-- 52 -->🎨 Styling", message = "^style" }, |
| 98 | + { group = "<!-- 60 -->📚 Documentation", message = "^docs" }, |
| 99 | + { group = "<!-- 80 -->🧪 Testing", message = "^test" }, |
| 100 | + { group = "<!-- 98 -->◀️ Revert", message = "^revert" }, |
| 101 | + { group = "<!-- 99 -->⚙️ Miscellaneous Tasks", message = "^chore" }, |
| 102 | + { group = "<!-- 99 -->� Other", message = ".*" }, |
| 103 | +] |
| 104 | +# filter out the commits that are not matched by commit parsers |
| 105 | +filter_commits = false |
| 106 | +# sort the tags topologically |
| 107 | +topo_order = false |
| 108 | +# sort the commits inside sections by oldest/newest order |
| 109 | +sort_commits = "oldest" |
| 110 | + |
| 111 | +[remote.github] |
| 112 | +owner = "pact-foundation" |
| 113 | +repo = "pact-python" |
0 commit comments