mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 01:27:22 +00:00
Add and use RepositoryNwoStr type
This commit is contained in:
13
lib/entry-points.js
generated
13
lib/entry-points.js
generated
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user