mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-08 14:47:59 +02:00
fix invalid method call
This commit is contained in:
+4
-2
@@ -134,8 +134,10 @@ module.exports.getTree = async (repoConfig, sha, truncatedTree, parentPath) => {
|
|||||||
|
|
||||||
if (!parentPath) parentPath = "";
|
if (!parentPath) parentPath = "";
|
||||||
|
|
||||||
|
const token = await githubUtils.getToken(repoConfig);
|
||||||
|
|
||||||
const octokit = new Octokit({
|
const octokit = new Octokit({
|
||||||
auth: await githubUtils.getToken(repoConfig),
|
auth: token,
|
||||||
});
|
});
|
||||||
const ghRes = await octokit.git.getTree({
|
const ghRes = await octokit.git.getTree({
|
||||||
owner: repo.owner,
|
owner: repo.owner,
|
||||||
@@ -337,7 +339,7 @@ module.exports.isFilePathValid = async (options) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (ofs.existsSync(anonymizedFilePath)) {
|
if (ofs.existsSync(anonymizedFilePath)) {
|
||||||
if (fs.lstatSync(anonymizedFilePath).isDirectory()) {
|
if (ofs.lstatSync(anonymizedFilePath).isDirectory()) {
|
||||||
throw "is_folder";
|
throw "is_folder";
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user