Skip to content

Commit a9c4098

Browse files
committed
fix: glob match
1 parent 75c8d14 commit a9c4098

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export const robot = (app: Probot) => {
195195
const matchPatterns = (patterns: string[], path: string) => {
196196
return patterns.some((pattern) => {
197197
try {
198-
return minimatch(path, pattern.startsWith('/') || pattern.startsWith('**') ? pattern : `**/${pattern}`);
198+
return minimatch(path, pattern.startsWith('/') ? "**" + pattern : pattern.startsWith("**") ? pattern : "**/" + pattern);
199199
} catch {
200200
// if the pattern is not a valid glob pattern, try to match it as a regular expression
201201
try {

0 commit comments

Comments
 (0)