|
| 1 | +[remote.github] |
| 2 | +owner = "graphqlient" |
| 3 | +repo = "qlient" |
| 4 | + |
| 5 | +[changelog] |
| 6 | +body = """ |
| 7 | +## What's Changed |
| 8 | +
|
| 9 | +{%- if version %} in {{ version }}{%- endif -%} |
| 10 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 11 | + ### {{ group | upper_first }} |
| 12 | + {%- for commit in commits %} |
| 13 | + {% if commit.remote.pr_title -%} |
| 14 | + {%- set commit_message = commit.remote.pr_title -%} |
| 15 | + {%- else -%} |
| 16 | + {%- set commit_message = commit.message -%} |
| 17 | + {%- endif -%} |
| 18 | + * {{ commit_message | split(pat="\n") | first | trim }}\ |
| 19 | + {% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%} |
| 20 | + {% if commit.remote.pr_number %} in \ |
| 21 | + [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \ |
| 22 | + {%- endif %} |
| 23 | + {%- endfor -%} |
| 24 | +{%- endfor -%} |
| 25 | +
|
| 26 | +{%- if github -%} |
| 27 | +{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} |
| 28 | + {% raw %}\n{% endraw -%} |
| 29 | + ## New Contributors |
| 30 | +{%- endif %}\ |
| 31 | +{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} |
| 32 | + * @{{ contributor.username }} made their first contribution |
| 33 | + {%- if contributor.pr_number %} in \ |
| 34 | + [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ |
| 35 | + {%- endif %} |
| 36 | +{%- endfor -%} |
| 37 | +{%- endif -%} |
| 38 | +
|
| 39 | +{% if version %} |
| 40 | + {% if previous.version %} |
| 41 | + **Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }} |
| 42 | + {% endif %} |
| 43 | +{% else -%} |
| 44 | + {% raw %}\n{% endraw %} |
| 45 | +{% endif %} |
| 46 | +
|
| 47 | +{%- macro remote_url() -%} |
| 48 | + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} |
| 49 | +{%- endmacro -%} |
| 50 | +""" |
| 51 | +# remove the leading and trailing whitespace from the template |
| 52 | +trim = true |
| 53 | +# template for the changelog footer |
| 54 | +footer = """""" |
| 55 | +# postprocessors |
| 56 | +postprocessors = [] |
| 57 | + |
| 58 | +[git] |
| 59 | +# parse the commits based on https://www.conventionalcommits.org |
| 60 | +conventional_commits = true |
| 61 | +# filter out the commits that are not conventional |
| 62 | +filter_unconventional = true |
| 63 | +# process each line of a commit as an individual commit |
| 64 | +split_commits = false |
| 65 | +# regex for preprocessing the commit messages |
| 66 | +commit_preprocessors = [ |
| 67 | + # remove issue numbers from commits |
| 68 | + { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }, |
| 69 | +] |
| 70 | +# regex for parsing and grouping commits |
| 71 | +commit_parsers = [ |
| 72 | + { message = "^feat", group = "<!-- 0 -->⛰️ Features" }, |
| 73 | + { message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" }, |
| 74 | + { message = "^doc", group = "<!-- 3 -->📚 Documentation" }, |
| 75 | + { message = "^perf", group = "<!-- 4 -->⚡ Performance" }, |
| 76 | + { message = "^refactor", group = "<!-- 2 -->🚜 Refactor" }, |
| 77 | + { message = "^style", group = "<!-- 5 -->🎨 Styling" }, |
| 78 | + { message = "^test", group = "<!-- 6 -->🧪 Testing" }, |
| 79 | + { message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" }, |
| 80 | + { body = ".*security", group = "<!-- 8 -->🛡️ Security" }, |
| 81 | + { message = "^revert", group = "<!-- 9 -->◀️ Revert" }, |
| 82 | +] |
| 83 | + |
| 84 | +# filter out the commits that are not matched by commit parsers |
| 85 | +filter_commits = false |
| 86 | +# sort the tags topologically |
| 87 | +topo_order = false |
| 88 | +# sort the commits inside sections by oldest/newest order |
| 89 | +sort_commits = "newest" |
0 commit comments