From 27362cbf2ea9ac94dfa634791b951279625a28e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Barr=C3=A9?= Date: Wed, 14 Dec 2022 22:12:02 +0100 Subject: [PATCH] chore: only apply commit convention to PR titles (#11296) --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/commit-convention.md | 61 +-------------------- .github/semantic.yml | 17 ------ .github/workflows/semantic-pull-request.yml | 6 ++ CONTRIBUTING.md | 4 +- package.json | 3 +- scripts/verifyCommit.ts | 28 ---------- 7 files changed, 13 insertions(+), 108 deletions(-) delete mode 100644 .github/semantic.yml delete mode 100644 scripts/verifyCommit.ts diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 946e6aa9bedb9f..c393c93c94e659 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -20,7 +20,7 @@ ### Before submitting the PR, please make sure you do the following - [ ] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md). -- [ ] Read the [Pull Request Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md#pull-request-guidelines) and follow the [Commit Convention](https://github.com/vitejs/vite/blob/main/.github/commit-convention.md). +- [ ] Read the [Pull Request Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md#pull-request-guidelines) and follow the [PR Title Convention](https://github.com/vitejs/vite/blob/main/.github/commit-convention.md). - [ ] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate. - [ ] Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`). - [ ] Ideally, include relevant tests that fail without this PR but pass with it. diff --git a/.github/commit-convention.md b/.github/commit-convention.md index baa447479e9c39..4971cff4547fce 100644 --- a/.github/commit-convention.md +++ b/.github/commit-convention.md @@ -8,64 +8,21 @@ Messages must be matched by the following regex: ```js -/^(revert: )?(feat|fix|docs|dx|refactor|perf|test|workflow|build|ci|chore|types|wip|release|deps)(\(.+\))?: .{1,50}/ +/^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore)(\(.+\))?!?: .{1,50}/ ``` #### Examples -Appears under "Features" header, `dev` subheader: - ``` feat(dev): add 'comments' option -``` - -Appears under "Bug Fixes" header, `dev` subheader, with a link to issue #28: - -``` fix(dev): fix dev error - -close #28 -``` - -Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: - -``` -perf(build): remove 'foo' option - -BREAKING CHANGE: The 'foo' option has been removed. -``` - -The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header. - -``` +perf(build)!: remove 'foo' option revert: feat(compiler): add 'comments' option - -This reverts commit 667ecc1654a317a13331b17617d973392f415f02. -``` - -### Full Message Format - -A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: - -``` -(): - - - -