Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3f81f38

Browse files
mafredrijohnstcn
andauthored
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 <[email protected]>
1 parent b1588fa commit 3f81f38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/release/check_commit_metadata.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ ignore_missing_metadata=${CODER_IGNORE_MISSING_COMMIT_METADATA:-0}
4040

4141
main() {
4242
# Match a commit prefix pattern, e.g. feat: or feat(site):.
43-
prefix_pattern="^([a-z]+)(\([a-z]*\))?:"
43+
prefix_pattern="^([a-z]+)(\([^)]+\))?:"
4444

4545
# If a commit contains this title prefix or the source PR contains the
4646
# label, patch releases will not be allowed.
4747
# This regex matches both `feat!:` and `feat(site)!:`.
48-
breaking_title="^[a-z]+(\([a-z]*\))?!:"
48+
breaking_title="^[a-z]+(\([^)]+\))?!:"
4949
breaking_label=release/breaking
5050
breaking_category=breaking
5151
experimental_label=release/experimental

0 commit comments

Comments
 (0)