diff --git a/utils/file.js b/utils/file.js index 0258672..c578c02 100644 --- a/utils/file.js +++ b/utils/file.js @@ -120,7 +120,11 @@ module.exports.getTree = async (repoConfig, sha, truncatedTree, parentPath) => { const repo = gh(repoConfig.fullName); if (!sha) { - sha = repoConfig.commit ? repoConfig.commit : "HEAD"; + if (repoConfig.commit && !/^[a-f0-9]+$/.test(repoConfig.commit)) { + sha = repoConfig.commit + } else { + sha = "HEAD" + } } if (!parentPath) parentPath = "";