feat(exempt): add new options to exempt the milestones (#279)

* feat(exempt): add new options to exempt the milestones

closes #270

* test(milestones): add coverage

* test(issue): add coverage

* chore(rebase): fix all errors due to the rebase

also made some changes regarding the change I made with the lint scripts and prettier. I did not saw that some scripts were already here and I created to more to keep the old ones as well

* test(milestone): add coverage

* chore(index): update index

* fix(checks): remove checks over optional number options

the code was actually handling the case where the values are NaN so it's fine
This commit is contained in:
Geoffrey Testelin
2021-01-19 11:54:16 +01:00
committed by GitHub
parent 1b9f13b607
commit f71123a6f7
25 changed files with 2184 additions and 596 deletions

View File

@@ -1,15 +1,16 @@
import deburr from 'lodash.deburr';
import {Issue, Label} from '../IssueProcessor';
import {Issue} from '../classes/issue';
import {Label} from '../IssueProcessor';
import {CleanLabel} from '../types/clean-label';
/**
* @description
* Check if the label is listed as a label of the issue
* Check if the given label is listed as a label of the given issue
*
* @param {Readonly<Issue>} issue A GitHub issue containing some labels
* @param {Readonly<string>} label The label to check the presence with
*
* @return {boolean} Return true when the given label is also in the issue labels
* @return {boolean} Return true when the given label is also in the given issue labels
*/
export function isLabeled(
issue: Readonly<Issue>,