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 <cian@coder.com>
This commit is contained in:
Mathias Fredriksson 2023-06-15 13:57:18 +03:00 committed by GitHub
parent b1588fa596
commit 3f81f38fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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