mirror of
https://github.com/github/codeql-action.git
synced 2026-05-21 21:08:32 +00:00
Use github.context.payload... to determine if running on fork
This commit is contained in:
Generated
+2
-1
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.run = exports.tryUploadSarifIfRunFailed = void 0;
|
||||
const github = __importStar(require("@actions/github"));
|
||||
const actionsUtil = __importStar(require("./actions-util"));
|
||||
const api_client_1 = require("./api-client");
|
||||
const codeql_1 = require("./codeql");
|
||||
@@ -117,7 +118,7 @@ async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, p
|
||||
// We do not delete uploaded SARIFs if we're on a fork, as we're missing the
|
||||
// appropriate permissions.
|
||||
if (process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true" &&
|
||||
repositoryNwo.owner !== "github") {
|
||||
github.context.payload.pull_request?.head.repo.fork === false) {
|
||||
await removeUploadedSarif(uploadFailedSarifResult, logger);
|
||||
}
|
||||
// Upload appropriate Actions artifacts for debugging
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user