fix(remove-label): do not encode the label to make sure to remove it (#220)

* test: add two more tests relating the label syntax issues

both are failing

* chore: add more logs and fix the tests on error

meaning that I did not find a reproduction...

* chore: minor improvements with the types and logs

* fix(remove-label): do not encode the label to make sure to remove it

could lead to an issue since based on the comment it was here on purpose
This commit is contained in:
Geoffrey Testelin
2021-01-15 12:51:24 +01:00
committed by GitHub
parent 107018c400
commit ddc7648635
3 changed files with 107 additions and 8 deletions

View File

@@ -1,6 +1,8 @@
import deburr from 'lodash.deburr';
import {Issue, Label} from '../IssueProcessor';
type CleanLabel = string;
/**
* @description
* Check if the label is listed as a label of the issue
@@ -19,6 +21,6 @@ export function isLabeled(
});
}
function cleanLabel(label: Readonly<string>): string {
function cleanLabel(label: Readonly<string>): CleanLabel {
return deburr(label.toLowerCase());
}