mirror of
https://github.com/github/codeql-action.git
synced 2026-11-10 14:56:01 +00:00
Turn all feature flags on
This commit is contained in:
36
lib/feature-flags.js
generated
36
lib/feature-flags.js
generated
@@ -37,21 +37,27 @@ class GitHubFeatureFlags {
|
||||
this.logger = logger;
|
||||
}
|
||||
async getValue(flag) {
|
||||
// Bypassing the toolcache is disabled in test mode.
|
||||
if (flag === FeatureFlag.BypassToolcacheEnabled && util.isInTestMode()) {
|
||||
return false;
|
||||
}
|
||||
const response = await this.getApiResponse();
|
||||
if (response === undefined) {
|
||||
this.logger.debug(`No feature flags API response for ${flag}, considering it disabled.`);
|
||||
return false;
|
||||
}
|
||||
const flagValue = response[flag];
|
||||
if (flagValue === undefined) {
|
||||
this.logger.debug(`Feature flag '${flag}' undefined in API response, considering it disabled.`);
|
||||
return false;
|
||||
}
|
||||
return flagValue;
|
||||
// Always return true for purposes of investigation in this PR.
|
||||
return true;
|
||||
// // Bypassing the toolcache is disabled in test mode.
|
||||
// if (flag === FeatureFlag.BypassToolcacheEnabled && util.isInTestMode()) {
|
||||
// return false;
|
||||
// }
|
||||
// const response = await this.getApiResponse();
|
||||
// if (response === undefined) {
|
||||
// this.logger.debug(
|
||||
// `No feature flags API response for ${flag}, considering it disabled.`
|
||||
// );
|
||||
// return false;
|
||||
// }
|
||||
// const flagValue = response[flag];
|
||||
// if (flagValue === undefined) {
|
||||
// this.logger.debug(
|
||||
// `Feature flag '${flag}' undefined in API response, considering it disabled.`
|
||||
// );
|
||||
// return false;
|
||||
// }
|
||||
// return flagValue;
|
||||
}
|
||||
async getApiResponse() {
|
||||
const loadApiResponse = async () => {
|
||||
|
||||
Reference in New Issue
Block a user