Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 98fa0c0

Browse files
committed
Use github.context.payload... to determine if running on fork
1 parent 30f279c commit 98fa0c0

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

lib/init-action-post-helper.js

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/init-action-post-helper.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import * as github from "@actions/github";
2+
13
import * as actionsUtil from "./actions-util";
24
import { getApiClient } from "./api-client";
35
import { getCodeQL } from "./codeql";
@@ -186,7 +188,7 @@ export async function run(
186188
// appropriate permissions.
187189
if (
188190
process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true" &&
189-
repositoryNwo.owner !== "github"
191+
github.context.payload.pull_request?.head.repo.fork === "false"
190192
) {
191193
await removeUploadedSarif(uploadFailedSarifResult, logger);
192194
}

0 commit comments

Comments
 (0)