From 25f9d0c6f16f500b2a6238fd39cac2ec8a1bf0f1 Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Tue, 24 Mar 2026 14:36:05 +0800 Subject: [PATCH] ci: allow PR title to have parentheses Signed-off-by: Andy Lee --- scripts/extract-release-label.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/extract-release-label.mjs b/scripts/extract-release-label.mjs index 93d13be0..180f79e0 100644 --- a/scripts/extract-release-label.mjs +++ b/scripts/extract-release-label.mjs @@ -7,7 +7,9 @@ if (process.argv.length < 3) { } const prTitle = process.argv[2]; -const prLabel = prTitle.split(':')[0].trim(); +const match = prTitle.match(/^(\w+)(\(.+\))?:/); +const prLabel = match ? match[1].trim() : prTitle.split(':')[0].trim(); +console.log('PR Label:', prLabel); const config = await load({ extends: ["./commitlint.config.js"] }); const commitPrefix = config?.rules?.['type-enum']?.[2] || [];