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
commit f9ffc05520
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

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(