Skip to content

Commit a0afcce

Browse files
committed
Use repository NWO owner instead
1 parent 4885993 commit a0afcce

3 files changed

+11
-3
lines changed

lib/init-action-post-helper.js

+4-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post-helper.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/init-action-post-helper.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,12 @@ export async function run(
185185
}
186186

187187
core.info(`GITHUB_ACTOR is ${process.env["GITHUB_ACTOR"]}`);
188-
if (process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true") {
188+
// We do not delete uploaded SARIFs if we're on a fork, as we're missing the
189+
// appropriate permissions.
190+
if (
191+
process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true" &&
192+
repositoryNwo.owner !== "github"
193+
) {
189194
await removeUploadedSarif(uploadFailedSarifResult, logger);
190195
}
191196

0 commit comments

Comments
 (0)