Skip to content

Commit 5aa103d

Browse files
committed
Add InstanceURL and use in DownloadSource
1 parent 8fed29e commit 5aa103d

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎src/setup/repository.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { isRunningLocalAction } from "../actions-util";
33
import * as api from "../api-client";
44
import { ActionsEnvVars } from "../environment";
55
import { isRepositoryNwoStr, type RepositoryNwoStr } from "../repository";
6-
import { GITHUB_DOTCOM_URL } from "../util";
6+
import { GITHUB_DOTCOM_URL, type InstanceURL } from "../util";
77

88
/** The NWO of the standard CodeQL Action repository. */
99
export const CODEQL_DEFAULT_ACTION_REPOSITORY = "github/codeql-action";
@@ -43,7 +43,7 @@ export function getCodeQLActionRepository(
4343
}
4444

4545
/**A download source is a pair of strings. */
46-
export type DownloadSource = [string, RepositoryNwoStr];
46+
export type DownloadSource = [InstanceURL, RepositoryNwoStr];
4747

4848
/** GitHub.com, and the canonical Action. */
4949
export const DEFAULT_DOWNLOAD_SOURCE: DownloadSource = [

‎src/util.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@ const BASE_DATABASE_OIDS_FILE_NAME = "base-database-oids.json";
4646
*/
4747
const BROKEN_VERSIONS = ["0.0.0-20211207"];
4848

49+
/** A string representing a GitHub instance. */
50+
export type InstanceURL = string;
51+
4952
/**
5053
* The URL for github.com.
5154
*/
52-
export const GITHUB_DOTCOM_URL = "https://github.com";
55+
export const GITHUB_DOTCOM_URL: InstanceURL = "https://github.com";
5356

5457
/**
5558
* Default name of the debugging artifact.

0 commit comments

Comments
 (0)