mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 01:27:22 +00:00
Restore original getCodeQLActionRepository behaviour
This commit is contained in:
@@ -374,10 +374,16 @@ test("getExtraOptions throws for bad content", (t) => {
|
||||
test("getCodeQLActionRepository", (t) => {
|
||||
const logger = getRunnerLogger(true);
|
||||
|
||||
process.env["RUNNER_TEMP"] = path.dirname(__dirname);
|
||||
|
||||
initializeEnvironment(Mode.actions, "1.2.3");
|
||||
const repoActions = codeql.getCodeQLActionRepository(logger);
|
||||
t.deepEqual(repoActions, "github/codeql-action");
|
||||
|
||||
process.env["GITHUB_ACTION_REPOSITORY"] = "xxx/yyy";
|
||||
const repoEnv = codeql.getCodeQLActionRepository(logger);
|
||||
t.deepEqual(repoEnv, "xxx/yyy");
|
||||
|
||||
initializeEnvironment(Mode.runner, "1.2.3");
|
||||
|
||||
// isRunningLocalAction() === true
|
||||
@@ -385,8 +391,4 @@ test("getCodeQLActionRepository", (t) => {
|
||||
process.env["RUNNER_TEMP"] = path.dirname(__dirname);
|
||||
const repoLocalRunner = codeql.getCodeQLActionRepository(logger);
|
||||
t.deepEqual(repoLocalRunner, "github/codeql-action");
|
||||
|
||||
process.env["GITHUB_ACTION_REPOSITORY"] = "xxx/yyy";
|
||||
const repoEnv = codeql.getCodeQLActionRepository(logger);
|
||||
t.deepEqual(repoEnv, "xxx/yyy");
|
||||
});
|
||||
|
||||
@@ -175,7 +175,7 @@ function getCodeQLBundleName(): string {
|
||||
}
|
||||
|
||||
export function getCodeQLActionRepository(logger: Logger): string {
|
||||
if (util.isActions()) {
|
||||
if (!util.isActions()) {
|
||||
return CODEQL_DEFAULT_ACTION_REPOSITORY;
|
||||
} else {
|
||||
return getActionsCodeQLActionRepository(logger);
|
||||
|
||||
Reference in New Issue
Block a user