Add InstanceURL and use in DownloadSource

This commit is contained in:
Michael B. Gale
2026-10-12 15:52:22 +01:00
parent 8fed29eed7
commit 5aa103d050
2 changed files with 6 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ import { isRunningLocalAction } from "../actions-util";
import * as api from "../api-client";
import { ActionsEnvVars } from "../environment";
import { isRepositoryNwoStr, type RepositoryNwoStr } from "../repository";
import { GITHUB_DOTCOM_URL } from "../util";
import { GITHUB_DOTCOM_URL, type InstanceURL } from "../util";
/** The NWO of the standard CodeQL Action repository. */
export const CODEQL_DEFAULT_ACTION_REPOSITORY = "github/codeql-action";
@@ -43,7 +43,7 @@ export function getCodeQLActionRepository(
}
/**A download source is a pair of strings. */
export type DownloadSource = [string, RepositoryNwoStr];
export type DownloadSource = [InstanceURL, RepositoryNwoStr];
/** GitHub.com, and the canonical Action. */
export const DEFAULT_DOWNLOAD_SOURCE: DownloadSource = [

View File

@@ -46,10 +46,13 @@ const BASE_DATABASE_OIDS_FILE_NAME = "base-database-oids.json";
*/
const BROKEN_VERSIONS = ["0.0.0-20211207"];
/** A string representing a GitHub instance. */
export type InstanceURL = string;
/**
* The URL for github.com.
*/
export const GITHUB_DOTCOM_URL = "https://github.com";
export const GITHUB_DOTCOM_URL: InstanceURL = "https://github.com";
/**
* Default name of the debugging artifact.