Skip to content

Commit 32f5294

Browse files
authored
Update action.js
1 parent b8958d5 commit 32f5294

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

action.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ const setFromPath = octokit => owner => async repo => {
3737

3838
const contentsUrlDoesMatch = file => target => {
3939
const contents_url = decodeURIComponent(file.contents_url);
40-
const contents_path = contents_url.substring(contents_url.indexOf("contents/"));
41-
const doesMatch = minimatch(contents_url, `contents/${target}`);
42-
console.log(contents_url, `contents/${target}`, doesMatch);
40+
const contents_path = contents_url.substring(contents_url.indexOf("contents/"), contents_url.indexOf("?ref="));
41+
const doesMatch = minimatch(contents_path, `contents/${target}`);
42+
console.log(contents_path, `contents/${target}`, doesMatch);
4343
return doesMatch;
4444
};
4545

0 commit comments

Comments
 (0)