mirror of
https://github.com/github/codeql-action
synced 2026-06-16 05:08:43 +03:00
Only load repository properties for repos owned by orgs
This commit is contained in:
@@ -159,6 +159,9 @@ inputs:
|
||||
description: >-
|
||||
Explicitly enable or disable caching of project build dependencies.
|
||||
required: false
|
||||
repository-owner-type:
|
||||
default: ${{ github.event.repository.owner.type }}
|
||||
required: false
|
||||
outputs:
|
||||
codeql-path:
|
||||
description: The path of the CodeQL binary used for analysis
|
||||
|
||||
Generated
+4
-2
@@ -92561,9 +92561,11 @@ async function run(startedAt) {
|
||||
getTemporaryDirectory(),
|
||||
logger
|
||||
);
|
||||
const enableRepoProps = await features.getValue(
|
||||
"use_repository_properties" /* UseRepositoryProperties */
|
||||
const repositoryOwnerType = getOptionalInput("repository-owner-type");
|
||||
logger.debug(
|
||||
`Repository owner type is '${repositoryOwnerType ?? "unknown"}'.`
|
||||
);
|
||||
const enableRepoProps = repositoryOwnerType === "Organization" && await features.getValue("use_repository_properties" /* UseRepositoryProperties */);
|
||||
const repositoryProperties = enableRepoProps ? await loadPropertiesFromApi(gitHubVersion, logger, repositoryNwo) : {};
|
||||
const jobRunUuid = v4_default();
|
||||
logger.info(`Job run UUID is ${jobRunUuid}.`);
|
||||
|
||||
+6
-2
@@ -237,9 +237,13 @@ async function run(startedAt: Date) {
|
||||
);
|
||||
|
||||
// Fetch the values of known repository properties that affect us.
|
||||
const enableRepoProps = await features.getValue(
|
||||
Feature.UseRepositoryProperties,
|
||||
const repositoryOwnerType = getOptionalInput("repository-owner-type");
|
||||
logger.debug(
|
||||
`Repository owner type is '${repositoryOwnerType ?? "unknown"}'.`,
|
||||
);
|
||||
const enableRepoProps =
|
||||
repositoryOwnerType === "Organization" &&
|
||||
(await features.getValue(Feature.UseRepositoryProperties));
|
||||
const repositoryProperties = enableRepoProps
|
||||
? await loadPropertiesFromApi(gitHubVersion, logger, repositoryNwo)
|
||||
: {};
|
||||
|
||||
Reference in New Issue
Block a user