From 86a212fc1a78e4e3caae305d1715a8664b26ad02 Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Sun, 9 Jun 2024 22:04:25 -0400 Subject: [PATCH] fix lowercase logic --- .github/scripts/pr-title.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/pr-title.ts b/.github/scripts/pr-title.ts index af1de839f85..2c10756a892 100644 --- a/.github/scripts/pr-title.ts +++ b/.github/scripts/pr-title.ts @@ -28,7 +28,7 @@ async function run() { pull_number: github.context.payload.pull_request!.number, }); - const title = pullRequest.title; + const title: string = pullRequest.title.toLowerCase(); core.info(`Pull Request title: "${title}"`); @@ -52,7 +52,7 @@ Terminology: [bug(ui)]: Fix female trainer names // Check if title starts with an allowed prefix core.info(`Allowed prefixes: ${PREFIXES}`); - if (!PREFIXES.some((prefix) => title.toLowerCase().startsWith(prefix))) { + if (!PREFIXES.some((prefix) => title.startsWith(prefix))) { core.setFailed(`Pull Request title "${title}" did not match any of the prefixes - ${PREFIXES}`); return; }