mirror of
https://github.com/github/codeql-action
synced 2026-05-23 20:00:54 +03:00
Clean up repository properties feature flag
This commit is contained in:
Generated
-5
@@ -162243,11 +162243,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
-5
@@ -107992,11 +107992,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
-5
@@ -104292,11 +104292,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
-5
@@ -165729,11 +165729,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
+1
-13
@@ -105552,11 +105552,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
@@ -109648,7 +109643,6 @@ async function run(startedAt) {
|
||||
const repositoryPropertiesResult = await loadRepositoryProperties(
|
||||
repositoryNwo,
|
||||
gitHubVersion,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
const jobRunUuid = v4_default();
|
||||
@@ -110048,7 +110042,7 @@ exec ${goBinaryPath} "$@"`
|
||||
logger
|
||||
);
|
||||
}
|
||||
async function loadRepositoryProperties(repositoryNwo, gitHubVersion, features, logger) {
|
||||
async function loadRepositoryProperties(repositoryNwo, gitHubVersion, logger) {
|
||||
const repositoryOwnerType = github2.context.payload.repository?.owner.type;
|
||||
logger.debug(
|
||||
`Repository owner type is '${repositoryOwnerType ?? "unknown"}'.`
|
||||
@@ -110059,12 +110053,6 @@ async function loadRepositoryProperties(repositoryNwo, gitHubVersion, features,
|
||||
);
|
||||
return new Success({});
|
||||
}
|
||||
if (!await features.getValue("use_repository_properties_v2" /* UseRepositoryProperties */)) {
|
||||
logger.debug(
|
||||
"Skipping loading repository properties because the UseRepositoryProperties feature flag is disabled."
|
||||
);
|
||||
return new Success({});
|
||||
}
|
||||
try {
|
||||
return new Success(
|
||||
await loadPropertiesFromApi(gitHubVersion, logger, repositoryNwo)
|
||||
|
||||
Generated
-5
@@ -104283,11 +104283,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
-5
@@ -104180,11 +104180,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
-5
@@ -161649,11 +161649,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
-5
@@ -120972,11 +120972,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
-5
@@ -107439,11 +107439,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
-5
@@ -161811,11 +161811,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
-5
@@ -107153,11 +107153,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
@@ -87,7 +87,6 @@ export enum Feature {
|
||||
StartProxyRemoveUnusedRegistries = "start_proxy_remove_unused_registries",
|
||||
StartProxyUseFeaturesRelease = "start_proxy_use_features_release",
|
||||
UploadOverlayDbToApi = "upload_overlay_db_to_api",
|
||||
UseRepositoryProperties = "use_repository_properties_v2",
|
||||
ValidateDbConfig = "validate_db_config",
|
||||
}
|
||||
|
||||
@@ -352,11 +351,6 @@ export const featureConfig = {
|
||||
minimumVersion: undefined,
|
||||
toolsFeature: ToolsFeature.BundleSupportsOverlay,
|
||||
},
|
||||
[Feature.UseRepositoryProperties]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: undefined,
|
||||
},
|
||||
[Feature.ValidateDbConfig]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
@@ -251,7 +251,6 @@ async function run(startedAt: Date) {
|
||||
const repositoryPropertiesResult = await loadRepositoryProperties(
|
||||
repositoryNwo,
|
||||
gitHubVersion,
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
|
||||
@@ -821,7 +820,6 @@ async function run(startedAt: Date) {
|
||||
async function loadRepositoryProperties(
|
||||
repositoryNwo: RepositoryNwo,
|
||||
gitHubVersion: GitHubVersion,
|
||||
features: FeatureEnablement,
|
||||
logger: Logger,
|
||||
): Promise<Result<RepositoryProperties, unknown>> {
|
||||
// See if we can skip loading repository properties early. In particular,
|
||||
@@ -839,13 +837,6 @@ async function loadRepositoryProperties(
|
||||
return new Success({});
|
||||
}
|
||||
|
||||
if (!(await features.getValue(Feature.UseRepositoryProperties))) {
|
||||
logger.debug(
|
||||
"Skipping loading repository properties because the UseRepositoryProperties feature flag is disabled.",
|
||||
);
|
||||
return new Success({});
|
||||
}
|
||||
|
||||
try {
|
||||
return new Success(
|
||||
await loadPropertiesFromApi(gitHubVersion, logger, repositoryNwo),
|
||||
|
||||
Reference in New Issue
Block a user