From 5ab7127934380f3311d75a27d1e799f8a7081329 Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Wed, 6 Mar 2024 10:45:36 +0100 Subject: [PATCH 1/8] chore: rm cliff config and update pr template --- .github/PULL_REQUEST_TEMPLATE.md | 17 ++--- Makefile | 4 -- cliff.toml | 119 ------------------------------- 3 files changed, 5 insertions(+), 135 deletions(-) delete mode 100644 cliff.toml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index bedc75f1f52..53463951c52 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,21 +8,12 @@ v If a checkbox is n/a - please still include it but + a little note why - -closes: #XXXX - -### Commit Message / Changelog Entry +--- -```text -type: commit message -``` +This repository follows conventional commits: https://www.conventionalcommits.org/en/v1.0.0/ +Please refer to the guidelines for commit messages in ibc-go: (https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#commit-messages) -see the [guidelines](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#commit-messages) for commit messages. (view raw markdown for examples) - - - +closes: #XXXX + --- Before we can merge this PR, please make sure that all the following items have been diff --git a/Makefile b/Makefile index 96bc12dda24..6ff6bc42ece 100644 --- a/Makefile +++ b/Makefile @@ -167,10 +167,6 @@ build-docs: serve-docs: @cd docs && npm run serve -#? changelog: Show changelog -changelog: - docker run --rm -v "$$(pwd)"/.git:/app/ -v "$$(pwd)/cliff.toml":/app/cliff.toml orhunp/git-cliff:latest --unreleased --tag $(tag) - # If the DOCS_VERSION variable is not set, display an error message and exit ifndef DOCS_VERSION #? tag-docs-version: Tag the docs version diff --git a/cliff.toml b/cliff.toml deleted file mode 100644 index da5a41a196f..00000000000 --- a/cliff.toml +++ /dev/null @@ -1,119 +0,0 @@ -# configuration file for git-cliff (0.1.0) - -[changelog] -# changelog header -header = """ - - -# Changelog -All notable changes to this project will be documented in this file. -""" -# template for the changelog body -# https://tera.netlify.app/docs/#introduction -body = """ -{% if version %}\ - ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} -{% else %}\ - ## [unreleased] -{% endif %}\ -{% for group, commits in commits | group_by(attribute="group") %} - ### {{ group | striptags | trim | upper_first }} - {% for commit in commits %} - * {{ commit.message | upper_first }}\ - {% endfor %} -{% endfor %}\n -""" -# remove the leading and trailing whitespace from the template -trim = true -# changelog footer -footer = """ - -""" - -[git] -# parse the commits based on https://www.conventionalcommits.org -conventional_commits = true -# filter out the commits that are not conventional -filter_unconventional = true -# process each line of a commit as an individual commit -split_commits = true -# regex for preprocessing the commit messages -commit_preprocessors = [ - # A reference to an issue is appended to commits that looks like "(#1234)", this will be replaced - # with a link to that issue, e.g. "[#$1234](https://github.com/cosmos/ibc-go/issues/1234)". - { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/cosmos/ibc-go/issues/${2}))" }, - # any reference to a pr like "pr-1234" will be replaced with a link to the PR. - { pattern = '\(pr-([0-9]+)\)', replace = "([#${1}](https://github.com/cosmos/ibc-go/pulls/${1}))" }, - - # the following patterns only exist because "split_commits" is set to true, and we are processesing - # each line of the commit as a separate message. - # these exist to filter out common messages that appear in commit messages that are technically - # conventional, but we do not way to include in the changelog. - { pattern = '^Signed-off-by:.*', replace='' }, - { pattern = '^Co-authored-by:.*', replace='' }, - # don't include references to issues as changelog entries. - { pattern = '^ref:.*', replace='' }, - # exclude CVSS format, CVE can still be included in regular conventinal commits. - { pattern = 'CVSS:.*', replace='' }, - # don't include dependabot auto merge entries. - { pattern = '.*dependabot-automerge-.*', replace='' }, - # don't include statements saying which issue is closed. - { pattern = '^closes:.*', replace='' }, - # remove standalone links in the commit messages. - { pattern = '^https://.*', replace='' }, - # remove lines with html. - { pattern = '^<.*', replace='' }, -] - -# regex for parsing and grouping commits -commit_parsers = [ - # specifying the number in a comment is a workaround to enable ordering of groups. - # these comments are stripped out of the markdown with the filter "{{ group | striptags | trim | upper_first }}" - # above in the body template. - { message = "^((?i)deps|(?i)dep|(?i)build)", group = "Dependencies" }, - { message = '^.*\(api\)!', group = "API Breaking" }, - { message = '^.*\(statemachine\)!', group = "State Machine Breaking" }, - { message = "^((?i)improvements|(?i)imp)", group = "Improvements" }, - { message = "^((?i)feature|(?i)feat)", group = "Features" }, - { message = "^((?i)fix|(?i)bug)", group = "Bug Fixes" }, - { message = "^((?i)doc|(?i)docs|(?i)documentation)", group = "Documentation" }, - { message = "^((?i)test|(?i)e2e)", group = "Testing" }, - { message = "^((?i)deprecated)", group = "Deprecated" }, - { message = "^((?i)chore|(?i)misc|(?i)nit)", group = "Miscellaneous Tasks" }, -] -# filter out the commits that are not matched by commit parsers -filter_commits = false -# glob pattern for matching git tags -tag_pattern = "v[0-9]*" -# regex for skipping tags -skip_tags = "" -# regex for ignoring tags -ignore_tags = "" -# sort the tags chronologically -date_order = false -# sort the commits inside sections by oldest/newest order -sort_commits = "oldest" From c46a889eeabebb772a8c692416cd7fcb47dec4a1 Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Wed, 6 Mar 2024 10:48:57 +0100 Subject: [PATCH 2/8] chore: restructure pr template such that closes is not hidden in view --- .github/PULL_REQUEST_TEMPLATE.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 53463951c52..31f87e73e0a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,11 +8,13 @@ v If a checkbox is n/a - please still include it but + a little note why + +closes: #XXXX ---- + -closes: #XXXX --- From 1f8d5ba40337dab1997080ffc430626dd52f3e55 Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Wed, 6 Mar 2024 10:55:08 +0100 Subject: [PATCH 3/8] chore: update task list in pr template --- .github/PULL_REQUEST_TEMPLATE.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 31f87e73e0a..a96213f9dfd 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -39,8 +39,9 @@ write a little note why. - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/build/building-modules/11-structure.md) and [Go style guide](../docs/dev/go-style-guide.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/main/testing/README.md#ibc-testing-package). -- [ ] Updated relevant documentation (`docs/`) or specification (`x//spec/`). +- [ ] Updated relevant documentation (`docs/`). - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). -- [ ] Provide a [commit message](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#commit-messages) to be used for the changelog entry in the PR description for review. +- [ ] Provide a [conventional commit message](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#commit-messages) to follow the repository standards. +- [ ] Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog) - [ ] Re-reviewed `Files changed` in the Github PR explorer. - [ ] Review `Codecov Report` in the comment section below once CI passes. From 8d7f5cbccf9b6828eb9ceeae899f15277df492a3 Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Wed, 6 Mar 2024 10:57:00 +0100 Subject: [PATCH 4/8] chore: update markdown formatting in pr template --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a96213f9dfd..ee21299fee7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -12,9 +12,9 @@ are the most critical to review. closes: #XXXX - - --- Before we can merge this PR, please make sure that all the following items have been From 5320e1eaa44d102baa25faf6b3c0ac5d3f1ea3f0 Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Wed, 6 Mar 2024 11:33:04 +0100 Subject: [PATCH 6/8] Update .github/PULL_REQUEST_TEMPLATE.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ee34c55273b..140a55fa6ce 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -42,5 +42,5 @@ write a little note why. - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). - [ ] Provide a [conventional commit message](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#commit-messages) to follow the repository standards. - [ ] Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog) -- [ ] Re-reviewed `Files changed` in the Github PR explorer. +- [ ] Re-reviewed `Files changed` in the GitHub PR explorer. - [ ] Review `Codecov Report` in the comment section below once CI passes. From 7a539c55027e372d85a7cd30fc0a31b1933fcedc Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Wed, 6 Mar 2024 11:33:20 +0100 Subject: [PATCH 7/8] Update .github/PULL_REQUEST_TEMPLATE.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 140a55fa6ce..391a142486d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -35,7 +35,7 @@ checked off. If any of the checklist items are not applicable, please leave them write a little note why. - [ ] Targeted PR against the correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#pull-request-targeting)). -- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. +- [ ] Linked to GitHub issue with discussion and accepted design OR link to spec that describes this work. - [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/build/building-modules/11-structure.md) and [Go style guide](../docs/dev/go-style-guide.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/main/testing/README.md#ibc-testing-package). - [ ] Updated relevant documentation (`docs/`). From d856bd35f151ad282505d69e77d12989205bf519 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Wed, 6 Mar 2024 12:03:55 +0100 Subject: [PATCH 8/8] Update .github/PULL_REQUEST_TEMPLATE.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 391a142486d..6892d116b0a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -35,7 +35,7 @@ checked off. If any of the checklist items are not applicable, please leave them write a little note why. - [ ] Targeted PR against the correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#pull-request-targeting)). -- [ ] Linked to GitHub issue with discussion and accepted design OR link to spec that describes this work. +- [ ] Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work. - [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/build/building-modules/11-structure.md) and [Go style guide](../docs/dev/go-style-guide.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/main/testing/README.md#ibc-testing-package). - [ ] Updated relevant documentation (`docs/`).