mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-05-14 15:01:44 +00:00
ci: allow PR title to have parentheses
Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
parent
f3c442f0ea
commit
25f9d0c6f1
@ -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] || [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user