From 188881c8fc1a26dcaebac51c78861449960c5a58 Mon Sep 17 00:00:00 2001 From: Adrian Kashivskyy Date: Wed, 22 Jun 2022 15:33:07 +0200 Subject: [PATCH] Compare lowercase labels --- src/add-to-project.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-to-project.ts b/src/add-to-project.ts index d57165d..e5355dc 100644 --- a/src/add-to-project.ts +++ b/src/add-to-project.ts @@ -35,14 +35,14 @@ export async function addToProject(): Promise { core .getInput('labeled') .split(',') - .map(l => l.trim()) + .map(l => l.trim().toLowerCase()) .filter(l => l.length > 0) ?? [] const labelOperator = core.getInput('label-operator').trim().toLocaleLowerCase() const octokit = github.getOctokit(ghToken) const urlMatch = projectUrl.match(urlParse) const issue = github.context.payload.issue ?? github.context.payload.pull_request - const issueLabels: string[] = (issue?.labels ?? []).map((l: {name: string}) => l.name) + const issueLabels: string[] = (issue?.labels ?? []).map((l: { name: string }) => l.name.toLowerCase()) // Ensure the issue matches our `labeled` filter based on the label-operator. if (labelOperator === 'and') {