This commit is contained in:
David Verdeguer 2022-09-07 09:45:19 +02:00
parent 335aa5e39f
commit a03f3bd585
8 changed files with 29 additions and 9 deletions

2
lib/trap-caching.js generated
View file

@ -85,7 +85,7 @@ async function downloadTrapCaches(codeql, languages, logger) {
}
let baseSha = "unknown";
const eventPath = process.env.GITHUB_EVENT_PATH;
if (process.env.GITHUB_EVENT_NAME === "pull_request" &&
if (actionsUtil.workflowEventName() === "pull_request" &&
eventPath !== undefined) {
const event = JSON.parse(fs.readFileSync(path.resolve(eventPath), "utf-8"));
baseSha = ((_b = (_a = event.pull_request) === null || _a === void 0 ? void 0 : _a.base) === null || _b === void 0 ? void 0 : _b.sha) || baseSha;