From 54303d085d0581fcae222a4941ceeab8d22d151c Mon Sep 17 00:00:00 2001 From: ckohen Date: Thu, 8 Aug 2024 14:50:20 -0700 Subject: [PATCH] chore: allow `!` to indicate breaking changes (#10430) * chore: allow `!` to indicate breaking changes * chore: update commit convention too --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .commitlintrc.json | 3 ++- .github/COMMIT_CONVENTION.md | 3 ++- .github/workflows/pr-triage.yml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.commitlintrc.json b/.commitlintrc.json index 80f57a1b9..fb8fbca56 100644 --- a/.commitlintrc.json +++ b/.commitlintrc.json @@ -7,6 +7,7 @@ "always", ["chore", "build", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test", "types"] ], - "scope-case": [0] + "scope-case": [0], + "subject-exclamation-mark": [0] } } diff --git a/.github/COMMIT_CONVENTION.md b/.github/COMMIT_CONVENTION.md index 2cfe9e325..4646a5ce1 100644 --- a/.github/COMMIT_CONVENTION.md +++ b/.github/COMMIT_CONVENTION.md @@ -7,7 +7,7 @@ Messages must be matched by the following regex: ```js -/^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types)(\(.+\))?: .{1,72}/; +/^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types)(\(.+\))?!?: .{1,72}/; ``` #### Examples @@ -55,6 +55,7 @@ A commit message consists of a **header**, **body** and **footer**. The header h ``` The **header** is mandatory and the **scope** of the header is optional. +If the commit contains **Breaking Changes**, a `!` can be added before the `:` as an indicator. ### Revert diff --git a/.github/workflows/pr-triage.yml b/.github/workflows/pr-triage.yml index 7a1443a10..82c7889dc 100644 --- a/.github/workflows/pr-triage.yml +++ b/.github/workflows/pr-triage.yml @@ -26,7 +26,7 @@ jobs: env: TITLE: ${{ github.event.pull_request.title }} run: | - REGEX="^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types)(\\(.+\\))?: .{1,72}$" + REGEX="^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types)(\\(.+\\))?!?: .{1,72}$" echo "Title: \"$TITLE\""