From 9d39320fd7bf5e3ded0a7b6c332133525afed8cc Mon Sep 17 00:00:00 2001 From: Benny Powers Date: Fri, 15 Mar 2024 08:53:39 +0200 Subject: [PATCH] chore: debug --- scripts/validate-prs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/validate-prs.js b/scripts/validate-prs.js index 827095e8a4..099487779f 100644 --- a/scripts/validate-prs.js +++ b/scripts/validate-prs.js @@ -33,7 +33,7 @@ export async function validate({ context }) { return true; } - const type = await getReleaseType(title, autoMerge?.merge_method); + const type = await getReleaseType(title, autoMerge?.merge_method) ?? null; const sets = await read(process.cwd()); /** @type {ReleaseType} */ @@ -49,6 +49,8 @@ export async function validate({ context }) { } }, null); + console.log({ release, type }); + if (!release && type?.match(/m(aj|in)or/)) { throw new Error(`PR conventional commit title has type (${type}) but no changesets were detected.`); }