mirror of
https://github.com/actions/labeler.git
synced 2025-12-13 04:57:21 +00:00
Remove deprecated IMinimatch import from labeler.ts
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as github from '@actions/github';
|
import * as github from '@actions/github';
|
||||||
import * as yaml from 'js-yaml';
|
import * as yaml from 'js-yaml';
|
||||||
import {Minimatch, IMinimatch} from 'minimatch';
|
import {Minimatch} from 'minimatch';
|
||||||
|
|
||||||
import {checkBranch, toMatchConfigWithBranches} from './branch';
|
import {checkBranch, toMatchConfigWithBranches} from './branch';
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ function toMatchConfig(config: StringOrMatchConfig): MatchConfig {
|
|||||||
return toMatchConfigWithBranches(config);
|
return toMatchConfigWithBranches(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
function printPattern(matcher: IMinimatch): string {
|
function printPattern(matcher: Minimatch): string {
|
||||||
return (matcher.negate ? '!' : '') + matcher.pattern;
|
return (matcher.negate ? '!' : '') + matcher.pattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@ export function checkGlobs(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isMatch(changedFile: string, matchers: IMinimatch[]): boolean {
|
function isMatch(changedFile: string, matchers: Minimatch[]): boolean {
|
||||||
core.debug(` matching patterns against file ${changedFile}`);
|
core.debug(` matching patterns against file ${changedFile}`);
|
||||||
for (const matcher of matchers) {
|
for (const matcher of matchers) {
|
||||||
core.debug(` - ${printPattern(matcher)}`);
|
core.debug(` - ${printPattern(matcher)}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user