From 242c2803d4fa8e0109be32b7ef1c7dc566ef6787 Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:42:16 +0200 Subject: [PATCH 1/7] chore: add release workflow Signed-off-by: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com> --- .github/workflows/release.yml | 89 +++++++++++++++++++++++++++++++++++ cliff-release.toml | 68 ++++++++++++++++++++++++++ cliff.toml | 75 +++++++++++++++++++++++++++++ 3 files changed, 232 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 cliff-release.toml create mode 100644 cliff.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..568df7a3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,89 @@ +name: Release + +on: + workflow_dispatch: + inputs: + version: + type: string + description: New version number in X.Y.Z + required: true + +jobs: + update-master-branch: + runs-on: ubuntu-latest + steps: + - uses: everlytic/branch-merge@1.1.5 + with: + github_token: ${{ secrets.PAT }} + source_ref: 'develop' + target_branch: 'master' + commit_message_template: '[Automated] Merged {source_ref} into target {target_branch}' + + release: + needs: [ 'update-master-branch' ] + runs-on: ubuntu-latest + steps: + - name: Fetch repo + uses: actions/checkout@v3 + with: + ref: 'master' + fetch-depth: 0 + + - name: Get latest tag + id: latest_tag + shell: bash + run: | + echo "TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_OUTPUT + - name: Generate a changelog + uses: orhun/git-cliff-action@v1 + id: generate-changelog + with: + config: ./cliff-release.toml + args: ${{ steps.latest_tag.outputs.TAG_NAME }}..HEAD + + - name: Create release and upload build + uses: softprops/action-gh-release@v1 + id: create-release + with: + name: v${{ github.event.inputs.version }} + tag_name: v${{ github.event.inputs.version }} + token: ${{ secrets.GITHUB_TOKEN }} + body: ${{ steps.generate-changelog.outputs.content }} + + update-changelog: + needs: [ 'release' ] + name: Generate changelog + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: 'master' + token: ${{ secrets.PAT }} + fetch-depth: 0 + + - name: Get latest tag + id: latest_tag + shell: bash + run: | + echo "TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_OUTPUT + - name: Generate a changelog + uses: orhun/git-cliff-action@v1 + id: git-cliff + with: + config: cliff.toml + args: v0.0.0..${{ steps.latest_tag.outputs.TAG_NAME }} + env: + OUTPUT: ${{ github.workspace }}/CHANGELOG.md + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: 'docs(changelog): update changelog' + file_pattern: CHANGELOG.md + + - uses: everlytic/branch-merge@1.1.5 + with: + github_token: ${{ secrets.PAT }} + source_ref: 'master' + target_branch: 'develop' + commit_message_template: '[Automated] Merged {source_ref} into target {target_branch}' diff --git a/cliff-release.toml b/cliff-release.toml new file mode 100644 index 00000000..c0ef0528 --- /dev/null +++ b/cliff-release.toml @@ -0,0 +1,68 @@ +# configuration file for git-cliff (0.1.0) + +[changelog] +# changelog header +header = """ +# What's Changed +""" +# template for the changelog body +# https://tera.netlify.app/docs/#introduction +body = """ +{% for group, commits in commits | group_by(attribute="group") %}\ + ### {{ group | split(pat="$") | last | upper_first }} + {% for commit in commits + | filter(attribute="scope") + | sort(attribute="scope") %} + - **{{commit.scope}}**: {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](https://github.com/mainsail-crew/crowsnest/commit/{{ commit.id }})\ + {%- if commit.breaking %} + {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} + {%- endif -%} + + {%- endfor -%} + {%- for commit in commits %} + {%- if commit.scope -%} + {% else -%} + {% raw %}\n{% endraw %}\ + - {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }})\ + {%- if commit.breaking %} + {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} + {%- endif -%} + + {% endif -%} + {% endfor -%} + {% raw %}\n{% endraw %} +{% endfor %}\n\ +""" +# remove the leading and trailing whitespaces from the template +trim = true +# changelog footer +footer = """ +""" + +[git] +# allow only conventional commits +# https://www.conventionalcommits.org +conventional_commits = true +filter_unconventional = true +# regex for parsing and grouping commits +commit_parsers = [ + { message = "^docs\\(changelog\\):", group = "Changelog", skip = true}, # Old redundant commits + { message = "^chore\\(changelog\\): update changelog", group = "Changelog", skip = true}, # Old redundant commits + { message = "^chore: push version number to", group = "9$Other", skip = true}, # Old redundant commits + { message = "^feat(\\(.*\\))?:", group = "1$Features"}, + { message = "^feature(\\(.*\\))?:", group = "1$Features"}, + { message = "^fix(\\(.*\\))?:", group = "2$Bug Fixes and Improvements"}, + { message = "^docs(\\(.*\\))?:", group = "7$Documentation"}, + { message = "^perf(\\(.*\\))?:", group = "3$Performance"}, + { message = "^refactor(\\(.*\\))?:", group = "4$Refactor"}, + { message = "^style(\\(.*\\))?:", group = "5$Styling"}, + { message = "^test(\\(.*\\))?:", group = "9$Other"}, + { message = "^locale(\\(.*\\))?:", group = "6$Localization"}, + { message = "^chore(\\(.*\\))?:", group = "9$Other"}, + { body = ".*security", group = "Security"}, +] +# filter out the commits that are not matched by commit parsers +filter_commits = true +ignore_tags="v*-(beta|rc)*" +# glob pattern for matching git tags +tag_pattern = "v[0-9]*" diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 00000000..83ba9b67 --- /dev/null +++ b/cliff.toml @@ -0,0 +1,75 @@ +# configuration file for git-cliff (0.1.0) + +[changelog] +# changelog header +header = """ + +# Changelog +All notable changes to Crowsnest will be documented in this file.\n +""" +# template for the changelog body +# https://tera.netlify.app/docs/#introduction +body = """ +{% if version %}\ + ## [{{ version | trim_start_matches(pat="v") }}](https://github.com/mainsail-crew/crowsnest/releases/tag/{{version}}) - {{ timestamp | date(format="%Y-%m-%d") }} +\ +{% else %}\ + ## [unreleased] +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %}\ + ### {{ group | split(pat="$") | last | upper_first }} + {% for commit in commits + | filter(attribute="scope") + | sort(attribute="scope") %} + - **{{commit.scope}}**: {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](https://github.com/mainsail-crew/crowsnest/commit/{{ commit.id }})\ + {%- if commit.breaking %} + {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} + {%- endif -%} + {%- endfor -%} + {%- for commit in commits %} + {%- if commit.scope -%} + {% else -%} + {% raw %}\n{% endraw %}\ + - {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }})\ + {%- if commit.breaking %} + {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} + {%- endif -%} + {% endif -%} + {% endfor -%} + {% raw %}\n{% endraw %} +{% endfor %}\n\ +""" +# remove the leading and trailing whitespaces from the template +trim = true +# changelog footer +footer = """ +""" + +[git] +# allow only conventional commits +# https://www.conventionalcommits.org +conventional_commits = true +filter_unconventional = false +# regex for parsing and grouping commits +commit_parsers = [ + { message = "^docs\\(changelog\\):", group = "Changelog", skip = true}, # Old redundant commits + { message = "^chore\\(changelog\\): update changelog", group = "Changelog", skip = true}, # Old redundant commits + { message = "^chore: push version number to", group = "9$Other", skip = true}, # Old redundant commits + { message = "^feat(\\(.*\\))?:", group = "1$Features"}, + { message = "^feature(\\(.*\\))?:", group = "1$Features"}, + { message = "^fix(\\(.*\\))?:", group = "2$Bug Fixes and Improvements"}, + { message = "^docs(\\(.*\\))?:", group = "7$Documentation"}, + { message = "^perf(\\(.*\\))?:", group = "3$Performance"}, + { message = "^refactor(\\(.*\\))?:", group = "4$Refactor"}, + { message = "^style(\\(.*\\))?:", group = "5$Styling"}, + { message = "^test(\\(.*\\))?:", group = "9$Other"}, + { message = "^locale(\\(.*\\))?:", group = "6$Localization"}, + { message = "^chore(\\(.*\\))?:", group = "9$Other"}, + { body = ".*security", group = "Security"}, + { message = "release v2.1.2", group = "Release"}, # workaround for v2.1.2 release +] +# filter out the commits that are not matched by commit parsers +filter_commits = true +ignore_tags="v*-(beta|rc)*" +# glob pattern for matching git tags +tag_pattern = "v[0-9]*" From 6f1207aa4f45692874c7b5540f6d8a144830abbf Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com> Date: Thu, 26 Oct 2023 19:45:01 +0200 Subject: [PATCH 2/7] chore: fix GITHUB_TOKEN permissions --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 568df7a3..7c9e37ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,8 @@ jobs: release: needs: [ 'update-master-branch' ] runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Fetch repo uses: actions/checkout@v3 From 54471dc4f44327cddcbd40ffdf35beae8ade50e7 Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com> Date: Thu, 26 Oct 2023 22:38:14 +0200 Subject: [PATCH 3/7] chore: fix broken commit links --- cliff-release.toml | 2 +- cliff.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cliff-release.toml b/cliff-release.toml index c0ef0528..77e785dd 100644 --- a/cliff-release.toml +++ b/cliff-release.toml @@ -23,7 +23,7 @@ body = """ {%- if commit.scope -%} {% else -%} {% raw %}\n{% endraw %}\ - - {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }})\ + - {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](https://github.com/mainsail-crew/crowsnest/commit/{{ commit.id }})\ {%- if commit.breaking %} {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} {%- endif -%} diff --git a/cliff.toml b/cliff.toml index 83ba9b67..eb4e78a1 100644 --- a/cliff.toml +++ b/cliff.toml @@ -30,7 +30,7 @@ body = """ {%- if commit.scope -%} {% else -%} {% raw %}\n{% endraw %}\ - - {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }})\ + - {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](https://github.com/mainsail-crew/crowsnest/commit/{{ commit.id }})\ {%- if commit.breaking %} {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} {%- endif -%} From 180da335a36630254e5c25248c02950a31223faf Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com> Date: Fri, 27 Oct 2023 16:05:20 +0200 Subject: [PATCH 4/7] chore: add post- and preprocessing for release workflow --- cliff-release.toml | 41 +++++++++++++++++++++++++++-------------- cliff.toml | 41 ++++++++++++++++++++++++++--------------- 2 files changed, 53 insertions(+), 29 deletions(-) diff --git a/cliff-release.toml b/cliff-release.toml index 77e785dd..456d78e5 100644 --- a/cliff-release.toml +++ b/cliff-release.toml @@ -9,11 +9,11 @@ header = """ # https://tera.netlify.app/docs/#introduction body = """ {% for group, commits in commits | group_by(attribute="group") %}\ - ### {{ group | split(pat="$") | last | upper_first }} + ### {{ group | striptags | trim | upper_first }} {% for commit in commits | filter(attribute="scope") | sort(attribute="scope") %} - - **{{commit.scope}}**: {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](https://github.com/mainsail-crew/crowsnest/commit/{{ commit.id }})\ + - **{{commit.scope}}**: {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](/commit/{{ commit.id }})\ {%- if commit.breaking %} {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} {%- endif -%} @@ -23,7 +23,8 @@ body = """ {%- if commit.scope -%} {% else -%} {% raw %}\n{% endraw %}\ - - {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](https://github.com/mainsail-crew/crowsnest/commit/{{ commit.id }})\ + - {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](/commit/{{ commit.id }})\ + {%- if commit.breaking %} {%- if commit.breaking %} {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} {%- endif -%} @@ -39,6 +40,12 @@ trim = true footer = """ """ +# postprocessors +postprocessors = [ + { pattern = '(\(/pull/[0-9]+\)\)) \| .+', replace = "${1}" }, + { pattern = '', replace = "https://github.com/mainsail-crew/crowsnest" }, # replace repository URL +] + [git] # allow only conventional commits # https://www.conventionalcommits.org @@ -46,21 +53,27 @@ conventional_commits = true filter_unconventional = true # regex for parsing and grouping commits commit_parsers = [ + # Commits to skip { message = "^docs\\(changelog\\):", group = "Changelog", skip = true}, # Old redundant commits - { message = "^chore\\(changelog\\): update changelog", group = "Changelog", skip = true}, # Old redundant commits { message = "^chore: push version number to", group = "9$Other", skip = true}, # Old redundant commits - { message = "^feat(\\(.*\\))?:", group = "1$Features"}, - { message = "^feature(\\(.*\\))?:", group = "1$Features"}, - { message = "^fix(\\(.*\\))?:", group = "2$Bug Fixes and Improvements"}, - { message = "^docs(\\(.*\\))?:", group = "7$Documentation"}, - { message = "^perf(\\(.*\\))?:", group = "3$Performance"}, - { message = "^refactor(\\(.*\\))?:", group = "4$Refactor"}, - { message = "^style(\\(.*\\))?:", group = "5$Styling"}, - { message = "^test(\\(.*\\))?:", group = "9$Other"}, - { message = "^locale(\\(.*\\))?:", group = "6$Localization"}, - { message = "^chore(\\(.*\\))?:", group = "9$Other"}, + { message = "^chore\\(changelog\\): update changelog", group = "Changelog", skip = true}, # Old redundant commits + + # Commits to parse + { message = "^feat(\\(.*\\))?:", group = "Features"}, + { message = "^feature(\\(.*\\))?:", group = "Features"}, + { message = "^fix(\\(.*\\))?:", group = "Bug Fixes and Improvements"}, + { message = "^perf(\\(.*\\))?:", group = "Performance"}, + { message = "^refactor(\\(.*\\))?:", group = "Refactor"}, + { message = "^style(\\(.*\\))?:", group = "Styling"}, + { message = "^locale(\\(.*\\))?:", group = "Localization"}, + { message = "^docs(\\(.*\\))?:", group = "Documentation"}, + { message = "^test(\\(.*\\))?:", group = "Other"}, + { message = "^chore(\\(.*\\))?:", group = "Other"}, { body = ".*security", group = "Security"}, ] +commit_preprocessors = [ + { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))" }, +] # filter out the commits that are not matched by commit parsers filter_commits = true ignore_tags="v*-(beta|rc)*" diff --git a/cliff.toml b/cliff.toml index eb4e78a1..c1e66af4 100644 --- a/cliff.toml +++ b/cliff.toml @@ -17,11 +17,11 @@ body = """ ## [unreleased] {% endif %}\ {% for group, commits in commits | group_by(attribute="group") %}\ - ### {{ group | split(pat="$") | last | upper_first }} + ### {{ group | striptags | trim | upper_first }} {% for commit in commits | filter(attribute="scope") | sort(attribute="scope") %} - - **{{commit.scope}}**: {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](https://github.com/mainsail-crew/crowsnest/commit/{{ commit.id }})\ + - **{{commit.scope}}**: {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](/commit/{{ commit.id }})\ {%- if commit.breaking %} {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} {%- endif -%} @@ -30,7 +30,7 @@ body = """ {%- if commit.scope -%} {% else -%} {% raw %}\n{% endraw %}\ - - {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](https://github.com/mainsail-crew/crowsnest/commit/{{ commit.id }})\ + - {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](/commit/{{ commit.id }})\ {%- if commit.breaking %} {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} {%- endif -%} @@ -45,6 +45,12 @@ trim = true footer = """ """ +# postprocessors +postprocessors = [ + { pattern = '(\(/pull/[0-9]+\)\)) \| .+', replace = "${1}" }, + { pattern = '', replace = "https://github.com/mainsail-crew/crowsnest" }, # replace repository URL +] + [git] # allow only conventional commits # https://www.conventionalcommits.org @@ -52,21 +58,26 @@ conventional_commits = true filter_unconventional = false # regex for parsing and grouping commits commit_parsers = [ + # Commits to skip { message = "^docs\\(changelog\\):", group = "Changelog", skip = true}, # Old redundant commits - { message = "^chore\\(changelog\\): update changelog", group = "Changelog", skip = true}, # Old redundant commits { message = "^chore: push version number to", group = "9$Other", skip = true}, # Old redundant commits - { message = "^feat(\\(.*\\))?:", group = "1$Features"}, - { message = "^feature(\\(.*\\))?:", group = "1$Features"}, - { message = "^fix(\\(.*\\))?:", group = "2$Bug Fixes and Improvements"}, - { message = "^docs(\\(.*\\))?:", group = "7$Documentation"}, - { message = "^perf(\\(.*\\))?:", group = "3$Performance"}, - { message = "^refactor(\\(.*\\))?:", group = "4$Refactor"}, - { message = "^style(\\(.*\\))?:", group = "5$Styling"}, - { message = "^test(\\(.*\\))?:", group = "9$Other"}, - { message = "^locale(\\(.*\\))?:", group = "6$Localization"}, - { message = "^chore(\\(.*\\))?:", group = "9$Other"}, + { message = "^chore\\(changelog\\): update changelog", group = "Changelog", skip = true}, # Old redundant commits + + # Commits to parse + { message = "^feat(\\(.*\\))?:", group = "Features"}, + { message = "^feature(\\(.*\\))?:", group = "Features"}, + { message = "^fix(\\(.*\\))?:", group = "Bug Fixes and Improvements"}, + { message = "^perf(\\(.*\\))?:", group = "Performance"}, + { message = "^refactor(\\(.*\\))?:", group = "Refactor"}, + { message = "^style(\\(.*\\))?:", group = "Styling"}, + { message = "^locale(\\(.*\\))?:", group = "Localization"}, + { message = "^docs(\\(.*\\))?:", group = "Documentation"}, + { message = "^test(\\(.*\\))?:", group = "Other"}, + { message = "^chore(\\(.*\\))?:", group = "Other"}, { body = ".*security", group = "Security"}, - { message = "release v2.1.2", group = "Release"}, # workaround for v2.1.2 release +] +commit_preprocessors = [ + { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))" }, ] # filter out the commits that are not matched by commit parsers filter_commits = true From 43e0d88a516ee32f4300a838eb7b78edbf17c97c Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com> Date: Fri, 27 Oct 2023 21:03:10 +0200 Subject: [PATCH 5/7] chore: update cliff action version --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c9e37ef..ae8c677e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: run: | echo "TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_OUTPUT - name: Generate a changelog - uses: orhun/git-cliff-action@v1 + uses: orhun/git-cliff-action@v2 id: generate-changelog with: config: ./cliff-release.toml @@ -70,7 +70,7 @@ jobs: run: | echo "TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_OUTPUT - name: Generate a changelog - uses: orhun/git-cliff-action@v1 + uses: orhun/git-cliff-action@v2 id: git-cliff with: config: cliff.toml From 684d81b23f537b9744f0efa5c87acc96f553a24f Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com> Date: Fri, 27 Oct 2023 21:32:49 +0200 Subject: [PATCH 6/7] chore: fix syntax error --- cliff-release.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/cliff-release.toml b/cliff-release.toml index 456d78e5..53dc9e96 100644 --- a/cliff-release.toml +++ b/cliff-release.toml @@ -25,7 +25,6 @@ body = """ {% raw %}\n{% endraw %}\ - {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}](/commit/{{ commit.id }})\ {%- if commit.breaking %} - {%- if commit.breaking %} {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} {%- endif -%} From a0bb6243d4bc9a0f88211b7fdb27cd1895802454 Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com> Date: Fri, 27 Oct 2023 21:44:29 +0200 Subject: [PATCH 7/7] chore: fix PR url --- cliff-release.toml | 2 +- cliff.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cliff-release.toml b/cliff-release.toml index 53dc9e96..3975df70 100644 --- a/cliff-release.toml +++ b/cliff-release.toml @@ -71,7 +71,7 @@ commit_parsers = [ { body = ".*security", group = "Security"}, ] commit_preprocessors = [ - { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))" }, + { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/pull/${2}))" }, ] # filter out the commits that are not matched by commit parsers filter_commits = true diff --git a/cliff.toml b/cliff.toml index c1e66af4..6aa1d8bb 100644 --- a/cliff.toml +++ b/cliff.toml @@ -77,7 +77,7 @@ commit_parsers = [ { body = ".*security", group = "Security"}, ] commit_preprocessors = [ - { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))" }, + { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/pull/${2}))" }, ] # filter out the commits that are not matched by commit parsers filter_commits = true