Skip to content

Commit

Permalink
fix lowercase logic
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeRed committed Jun 10, 2024
1 parent 269bdb0 commit 86a212f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/pr-title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}"`);


Expand All @@ -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;
}
Expand Down

0 comments on commit 86a212f

Please sign in to comment.