diff --git a/.commitlintrc.yml b/.commitlintrc.yml index 2588ed10b..6d360d58b 100644 --- a/.commitlintrc.yml +++ b/.commitlintrc.yml @@ -1,6 +1,21 @@ extends: - '@commitlint/config-conventional' rules: + # Same as config-conventional, minus `test`. Test changes should use the + # type of the change they support (`fix`, `feat`, `chore`, etc). + type-enum: + - 2 + - always + - - build + - chore + - ci + - docs + - feat + - fix + - perf + - refactor + - revert + - style subject-case: - 0 - always diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index fca4e7605..f852333fe 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -22,5 +22,5 @@ jobs: - name: Check PR title with commitlint env: PR_TITLE: ${{ github.event.pull_request.title }} - HELP_URL: https://github.com/wxt-dev/wxt/blob/main/CONTRIBUTING.md#conventional-pr-titles + HELP_URL: https://github.com/wxt-dev/wxt/blob/main/CONTRIBUTING.md#conventional-commits--pr-titles run: echo "$PR_TITLE" | npx commitlint --help-url $HELP_URL diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf2f14442..030c387a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,6 +30,8 @@ Here are some examples of conventional commit messages: - `chore: fixed typos in code` - `docs: updated list of features on homepage` +Allowed types are `feat`, `fix`, `perf`, `refactor`, `docs`, `chore`, `ci`, `build`, `style`, and `revert`. The `test` type is **not** allowed: use the type of the change the tests support instead (e.g. `fix(wxt): ...` for a bug-fix's tests, or `chore: ...` for test-only cleanups). PRs with an invalid title will fail the "Check PR Title" CI job. + ## Breaking Changes Policy A quick word on WXT's breaking changes policy. I am willing to make breaking changes, but they have to be for a good enough reason - they have to make WXT better as a whole, they can't be based on one opinion.