Merge pull request #4 from actions/case-insensitive-label

Update label comparison to be case insensitive
This commit is contained in:
Shawn Napora
2019-08-07 09:32:59 -04:00
committed by GitHub

View File

@@ -86,7 +86,9 @@ function isLabeledStale(
issue: Octokit.IssuesListForRepoResponseItem, issue: Octokit.IssuesListForRepoResponseItem,
label: string label: string
): boolean { ): boolean {
return issue.labels.filter(i => i.name === label).length > 0; const labelComparer = l =>
label.localeCompare(l.name, undefined, {sensitivity: 'accent'});
return issue.labels.filter(labelComparer).length > 0;
} }
function wasLastUpdatedBefore( function wasLastUpdatedBefore(