mirror of
https://github.com/github/codeql-action.git
synced 2026-10-31 09:59:43 +00:00
Add and use RepositoryNwoStr type
This commit is contained in:
13
lib/entry-points.js
generated
13
lib/entry-points.js
generated
@@ -170631,6 +170631,9 @@ retry.VERSION = VERSION7;
|
||||
var import_undici = __toESM(require_undici());
|
||||
|
||||
// src/repository.ts
|
||||
function isRepositoryNwoStr(val) {
|
||||
return val.includes("/");
|
||||
}
|
||||
function getRepositoryNwo() {
|
||||
return getRepositoryNwoFromEnv("GITHUB_REPOSITORY");
|
||||
}
|
||||
@@ -175669,7 +175672,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,
|
||||
|
||||
Reference in New Issue
Block a user