Skip to content

Commit

Permalink
Use github.context.payload... to determine if running on fork
Browse files Browse the repository at this point in the history
  • Loading branch information
angelapwen committed Jan 16, 2024
1 parent 30f279c commit 98fa0c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/init-action-post-helper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/init-action-post-helper.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/init-action-post-helper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import * as github from "@actions/github";

import * as actionsUtil from "./actions-util";
import { getApiClient } from "./api-client";
import { getCodeQL } from "./codeql";
Expand Down Expand Up @@ -186,7 +188,7 @@ export async function run(
// 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);
}
Expand Down

0 comments on commit 98fa0c0

Please sign in to comment.