From 79e7216f269f6780e916d138591dda0836287bb0 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Thu, 15 Jun 2023 10:35:56 +0000 Subject: [PATCH 1/3] ci: Fix commit type prefix regexp in release script Previously we were incorrectly categorizing `fix(a/b): ...` as other because the regexp only expected letters, not `/`. Now we accept any input within the parenthesis. --- scripts/release/check_commit_metadata.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release/check_commit_metadata.sh b/scripts/release/check_commit_metadata.sh index c11f9d0b59abf..b70834e7586b0 100755 --- a/scripts/release/check_commit_metadata.sh +++ b/scripts/release/check_commit_metadata.sh @@ -40,7 +40,7 @@ ignore_missing_metadata=${CODER_IGNORE_MISSING_COMMIT_METADATA:-0} main() { # Match a commit prefix pattern, e.g. feat: or feat(site):. - prefix_pattern="^([a-z]+)(\([a-z]*\))?:" + prefix_pattern="^([a-z]+)(\([^)]*\))?:" # If a commit contains this title prefix or the source PR contains the # label, patch releases will not be allowed. From d5b6f66e53749b92a1329194b539b2564e74125c Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Thu, 15 Jun 2023 13:45:27 +0300 Subject: [PATCH 2/3] Update scripts/release/check_commit_metadata.sh Co-authored-by: Cian Johnston --- scripts/release/check_commit_metadata.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release/check_commit_metadata.sh b/scripts/release/check_commit_metadata.sh index b70834e7586b0..c1149441640d8 100755 --- a/scripts/release/check_commit_metadata.sh +++ b/scripts/release/check_commit_metadata.sh @@ -40,7 +40,7 @@ ignore_missing_metadata=${CODER_IGNORE_MISSING_COMMIT_METADATA:-0} main() { # Match a commit prefix pattern, e.g. feat: or feat(site):. - prefix_pattern="^([a-z]+)(\([^)]*\))?:" + prefix_pattern="^([a-z]+)(\([^)]+\))?:" # If a commit contains this title prefix or the source PR contains the # label, patch releases will not be allowed. From a729c18ba41132871bd1c1f9ef6df9da8dcdea73 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Thu, 15 Jun 2023 10:46:16 +0000 Subject: [PATCH 3/3] fix breaking title regexp as well --- scripts/release/check_commit_metadata.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release/check_commit_metadata.sh b/scripts/release/check_commit_metadata.sh index c1149441640d8..7ad78992d0e0c 100755 --- a/scripts/release/check_commit_metadata.sh +++ b/scripts/release/check_commit_metadata.sh @@ -45,7 +45,7 @@ main() { # If a commit contains this title prefix or the source PR contains the # label, patch releases will not be allowed. # This regex matches both `feat!:` and `feat(site)!:`. - breaking_title="^[a-z]+(\([a-z]*\))?!:" + breaking_title="^[a-z]+(\([^)]+\))?!:" breaking_label=release/breaking breaking_category=breaking experimental_label=release/experimental