diff --git a/pr-checks/update-ghes-versions.ts b/pr-checks/update-ghes-versions.ts index 784c12a05..283601572 100644 --- a/pr-checks/update-ghes-versions.ts +++ b/pr-checks/update-ghes-versions.ts @@ -14,7 +14,19 @@ import { API_COMPATIBILITY_FILE } from "./config"; /** The first GHES version that included Code Scanning. */ const FIRST_SUPPORTED_RELEASE: SemVer = new semver.SemVer("2.22.0"); -function main() {} +/** Environment variables specific to this script. */ +export enum EnvVar { + ENTERPRISE_RELEASES_PATH = "ENTERPRISE_RELEASES_PATH", +} + +function main() { + const enterpriseReleasesPath = process.env[EnvVar.ENTERPRISE_RELEASES_PATH]; + if (!enterpriseReleasesPath) { + throw new Error( + `${EnvVar.ENTERPRISE_RELEASES_PATH} environment variable must be set`, + ); + } +} // Only call `main` if this script was run directly. if (require.main === module) {