mirror of
https://github.com/github/codeql-action.git
synced 2026-05-08 23:00:26 +00:00
Rename feature flag to CODEQL_ACTION_ARTIFACT_V2_UPGRADE
This commit is contained in:
@@ -23,7 +23,7 @@ test("sanitizeArtifactName", (t) => {
|
||||
|
||||
test("uploadDebugArtifacts", async (t) => {
|
||||
// Test that no error is thrown if artifacts list is empty.
|
||||
const mockFeature = createFeatures([Feature.ArtifactUpgrade]);
|
||||
const mockFeature = createFeatures([Feature.ArtifactV2Upgrade]);
|
||||
await t.notThrowsAsync(
|
||||
debugArtifacts.uploadDebugArtifacts(
|
||||
[],
|
||||
|
||||
@@ -264,7 +264,7 @@ export async function uploadDebugArtifacts(
|
||||
// until it is supported. We also use the legacy version of the client if the feature flag is disabled.
|
||||
const artifactUploader =
|
||||
ghVariant !== GitHubVariant.GHES &&
|
||||
(await features.getValue(Feature.ArtifactUpgrade))
|
||||
(await features.getValue(Feature.ArtifactV2Upgrade))
|
||||
? new artifact.DefaultArtifactClient()
|
||||
: artifactLegacy.create();
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ export interface FeatureEnablement {
|
||||
* Legacy features should end with `_enabled`.
|
||||
*/
|
||||
export enum Feature {
|
||||
ArtifactUpgrade = "artifact_upgrade",
|
||||
ArtifactV2Upgrade = "artifact_v2_upgrade",
|
||||
CleanupTrapCaches = "cleanup_trap_caches",
|
||||
CppDependencyInstallation = "cpp_dependency_installation_enabled",
|
||||
DisableCsharpBuildless = "disable_csharp_buildless",
|
||||
@@ -81,9 +81,9 @@ export const featureConfig: Record<
|
||||
toolsFeature?: ToolsFeature;
|
||||
}
|
||||
> = {
|
||||
[Feature.ArtifactUpgrade]: {
|
||||
[Feature.ArtifactV2Upgrade]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ARTIFACT_UPGRADE",
|
||||
envVar: "CODEQL_ACTION_ARTIFACT_V2_UPGRADE",
|
||||
minimumVersion: undefined,
|
||||
},
|
||||
[Feature.CleanupTrapCaches]: {
|
||||
|
||||
@@ -66,7 +66,7 @@ async function runWrapper() {
|
||||
// until it is supported. We also use the legacy version of the client if the feature flag is disabled.
|
||||
const artifactUploader =
|
||||
config?.gitHubVersion.type !== GitHubVariant.GHES &&
|
||||
(await features.getValue(Feature.ArtifactUpgrade))
|
||||
(await features.getValue(Feature.ArtifactV2Upgrade))
|
||||
? new artifact.DefaultArtifactClient()
|
||||
: artifactLegacy.create();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user