Add and use RepositoryNwoStr type

This commit is contained in:
Michael B. Gale
2026-10-12 15:27:32 +01:00
parent 4a9e4edc72
commit 21ce56dffc
3 changed files with 35 additions and 5 deletions

13
lib/entry-points.js generated
View File

@@ -170662,6 +170662,9 @@ function getCurrentInstance(env) {
}
// src/repository.ts
function isRepositoryNwoStr(val) {
return val.includes("/");
}
function getRepositoryNwo() {
return getRepositoryNwoFromEnv("GITHUB_REPOSITORY");
}
@@ -175747,7 +175750,15 @@ function getCodeQLActionRepository(action) {
);
return CODEQL_DEFAULT_ACTION_REPOSITORY;
}
return action.env.getRequired("GITHUB_ACTION_REPOSITORY" /* GITHUB_ACTION_REPOSITORY */);
const actionRepository = action.env.getRequired(
"GITHUB_ACTION_REPOSITORY" /* GITHUB_ACTION_REPOSITORY */
);
if (isRepositoryNwoStr(actionRepository)) {
return actionRepository;
}
throw new Error(
`The value of '${"GITHUB_ACTION_REPOSITORY" /* GITHUB_ACTION_REPOSITORY */}' is '${actionRepository}', which does not match the expected 'owner/repo' format.`
);
}
var DEFAULT_DOWNLOAD_SOURCE = [
GITHUB_DOTCOM_URL,