From 3f81f38fcc1995b49e1357ead7c743d602a822ca Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Thu, 15 Jun 2023 13:57:18 +0300 Subject: [PATCH] ci: fix commit type prefix regexp in release script (#8046) 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. --------- Co-authored-by: Cian Johnston --- scripts/release/check_commit_metadata.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/release/check_commit_metadata.sh b/scripts/release/check_commit_metadata.sh index c11f9d0b59..7ad78992d0 100755 --- a/scripts/release/check_commit_metadata.sh +++ b/scripts/release/check_commit_metadata.sh @@ -40,12 +40,12 @@ 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. # 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