From 1dec4be0ff764f825bc27c7b28b71723d9aa8778 Mon Sep 17 00:00:00 2001 From: KasukabeDefenceForce Date: Tue, 16 Jul 2024 19:29:40 +0530 Subject: [PATCH] Shifting git cliff configuration to pyproject.toml --- .github/workflows/post-release.yml | 2 +- cliff.toml | 23 ----------------------- pyproject.toml | 24 +++++++++++++++++++++++- 3 files changed, 24 insertions(+), 25 deletions(-) delete mode 100644 cliff.toml diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index 6995d4c6e0b..173656f951a 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -23,7 +23,7 @@ jobs: - name: Generate a changelog uses: orhun/git-cliff-action@v3 with: - config: cliff.toml + config: pyproject.toml args: --verbose env: OUTPUT: CHANGELOG.md diff --git a/cliff.toml b/cliff.toml deleted file mode 100644 index 42fd21ddd6b..00000000000 --- a/cliff.toml +++ /dev/null @@ -1,23 +0,0 @@ -[changelog] -header = "## Changelog\n\n" -body = """ -### {{version}} ({{ timestamp | date(format="%Y/%m/%d %H:%M", timezone="America/New_York") }}) -{% for commit in commits %} - {%- if commit.github.pr_number -%} - - [{{commit.github.pr_number}}](https://github.com/tardis-sn/tardis/pull/{{commit.github.pr_number}}) {{ commit.github.pr_title | split(pat="\n") | first | trim }} ({{commit.github.pr_number}}) (@{{ commit.github.username }}) - {% endif -%} -{%- endfor -%} -""" - -trim = true -footer = "" -postprocessors = [{ pattern = "foo", replace = "bar"}] - -[git] -conventional_commits = false -filter_unconventional = false -sort_commits = "newest" - -[remote.github] -owner = "tardis-sn" -repo = "tardis" diff --git a/pyproject.toml b/pyproject.toml index d2d9c0a5e6f..f75fba277da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -192,4 +192,26 @@ markers = [ ] [tool.tardis] -edit_on_github = false \ No newline at end of file +edit_on_github = false + +[tool.git-cliff.changelog] +header = "## Changelog\n\n" +body = """ +### {{version}} ({{ timestamp | date(format="%Y/%m/%d %H:%M", timezone="America/New_York") }}) +{% for commit in commits %} + {%- if commit.github.pr_number -%} + - [{{commit.github.pr_number}}](https://github.com/tardis-sn/tardis/pull/{{commit.github.pr_number}}) {{ commit.github.pr_title | split(pat="\n") | first | trim }} ({{commit.github.pr_number}}) (@{{ commit.github.username }}) + {% endif -%} +{%- endfor -%} +""" +trim = true +footer = "" + +[tool.git-cliff.git] +conventional_commits = false +filter_unconventional = false +sort_commits = "newest" + +[tool.git-cliff.remote.github] +owner = "tardis-sn" +repo = "tardis" \ No newline at end of file