Skip to content

Commit bab8747

Browse files
committed
Tolerate forks of github/codeql-action
1 parent dba4f66 commit bab8747

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

lib/workflow.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/workflow.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/workflow.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import * as yaml from "js-yaml";
77

88
import * as api from "./api-client";
99
import { Logger } from "./logging";
10-
import { getRequiredEnvParam } from "./util";
10+
import { getRequiredEnvParam, isInTestMode } from "./util";
1111

1212
export interface WorkflowJobStep {
1313
name?: string;
@@ -389,7 +389,8 @@ function getInputOrThrow(
389389
* This allows us to test workflow parsing functionality as a CodeQL Action PR check.
390390
*/
391391
function getAnalyzeActionName() {
392-
if (getRequiredEnvParam("GITHUB_REPOSITORY") === "github/codeql-action") {
392+
if (isInTestMode() ||
393+
process.env["CODEQL_ACTION_TESTING_ENVIRONMENT"] === "codeql-action-pr-checks") {
393394
return "./analyze";
394395
} else {
395396
return "github/codeql-action/analyze";

0 commit comments

Comments
 (0)