Skip to content

Commit d8597f3

Browse files
committed
Remove fallback logic for GHES 2.22
1 parent 39fe7aa commit d8597f3

12 files changed

Lines changed: 12 additions & 110 deletions

lib/actions-util.js

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

lib/actions-util.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.

lib/codeql.js

Lines changed: 2 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.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.

lib/codeql.test.js

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.test.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.

lib/testing-utils.js

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

lib/testing-utils.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/actions-util.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -864,23 +864,6 @@ function isDependabotActor() {
864864
return process.env["GITHUB_ACTOR"] === "dependabot[bot]";
865865
}
866866

867-
// Is the current action executing a local copy (i.e. we're running a workflow on the codeql-action repo itself)
868-
// as opposed to running a remote action (i.e. when another repo references us)
869-
export function isRunningLocalAction(): boolean {
870-
const relativeScriptPath = getRelativeScriptPath();
871-
return (
872-
relativeScriptPath.startsWith("..") || path.isAbsolute(relativeScriptPath)
873-
);
874-
}
875-
876-
// Get the location where the action is running from.
877-
// This can be used to get the actions name or tell if we're running a local action.
878-
export function getRelativeScriptPath(): string {
879-
const runnerTemp = getRequiredEnvParam("RUNNER_TEMP");
880-
const actionsDirectory = path.join(path.dirname(runnerTemp), "_actions");
881-
return path.relative(actionsDirectory, __filename);
882-
}
883-
884867
// Reads the contents of GITHUB_EVENT_PATH as a JSON object
885868
function getWorkflowEvent(): any {
886869
const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH");

src/codeql.test.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -421,22 +421,6 @@ test("getExtraOptions throws for bad content", (t) => {
421421
);
422422
});
423423

424-
test("getCodeQLActionRepository", (t) => {
425-
const logger = getRunnerLogger(true);
426-
427-
initializeEnvironment("1.2.3");
428-
429-
// isRunningLocalAction() === true
430-
delete process.env["GITHUB_ACTION_REPOSITORY"];
431-
process.env["RUNNER_TEMP"] = path.dirname(__dirname);
432-
const repoLocalRunner = codeql.getCodeQLActionRepository(logger);
433-
t.deepEqual(repoLocalRunner, "github/codeql-action");
434-
435-
process.env["GITHUB_ACTION_REPOSITORY"] = "xxx/yyy";
436-
const repoEnv = codeql.getCodeQLActionRepository(logger);
437-
t.deepEqual(repoEnv, "xxx/yyy");
438-
});
439-
440424
test("databaseInterpretResults() does not set --sarif-add-query-help for 2.7.0", async (t) => {
441425
const runnerConstructorStub = stubToolRunnerConstructor();
442426
const codeqlObject = await codeql.getCodeQLForTesting();

0 commit comments

Comments
 (0)