mirror of
https://github.com/github/codeql-action.git
synced 2026-04-25 16:28:48 +00:00
Extract GitHubFeatureFlags to a separate class
Internal refactoring so that `GitHubFeatureFlags` is private only. The public facing class is `Features`.
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
Feature,
|
||||
featureConfig,
|
||||
FeatureFlags,
|
||||
GitHubFeatureFlags,
|
||||
Features,
|
||||
} from "./feature-flags";
|
||||
import { getRunnerLogger } from "./logging";
|
||||
import { parseRepositoryNwo } from "./repository";
|
||||
@@ -217,7 +217,7 @@ for (const featureFlag of Object.keys(featureConfig)) {
|
||||
await t.throwsAsync(
|
||||
async () => featureFlags.getValue(featureFlag as Feature),
|
||||
{
|
||||
message: `A minimum version is specified for feature flag ${featureFlag}, but no instance of CodeQL was provided.`,
|
||||
message: `Internal error: A minimum version is specified for feature flag ${featureFlag}, but no instance of CodeQL was provided.`,
|
||||
}
|
||||
);
|
||||
});
|
||||
@@ -288,12 +288,7 @@ function setUpTests(
|
||||
): FeatureFlags {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
|
||||
return new GitHubFeatureFlags(
|
||||
gitHubVersion,
|
||||
testApiDetails,
|
||||
testRepositoryNwo,
|
||||
logger
|
||||
);
|
||||
return new Features(gitHubVersion, testApiDetails, testRepositoryNwo, logger);
|
||||
}
|
||||
|
||||
function includeCodeQlIfRequired(featureFlag: string) {
|
||||
|
||||
Reference in New Issue
Block a user