Add and use RepositoryNwoStr type

This commit is contained in:
Michael B. Gale
2026-10-12 15:27:32 +01:00
parent 89b7c14bfa
commit 739fc3a530
3 changed files with 35 additions and 5 deletions

13
lib/entry-points.js generated
View File

@@ -170638,6 +170638,9 @@ function getCurrentInstance(env) {
}
// src/repository.ts
function isRepositoryNwoStr(val) {
return val.includes("/");
}
function getRepositoryNwo() {
return getRepositoryNwoFromEnv("GITHUB_REPOSITORY");
}
@@ -175719,7 +175722,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,