fix: tolerate other GitHub variants when retrieving feature flags from GitHub API

This commit is contained in:
Fotis Koutoulakis (@NlightNFotis) 2024-10-24 15:12:30 +01:00
parent b91f43b4e4
commit 1a02ac9a03
3 changed files with 7 additions and 3 deletions

3
lib/feature-flags.js generated
View file

@ -346,7 +346,8 @@ class GitHubFeatureFlags {
}
async loadApiResponse() {
// Do nothing when not running against github.com
if (this.gitHubVersion.type !== util.GitHubVariant.DOTCOM) {
if (this.gitHubVersion.type !== util.GitHubVariant.DOTCOM &&
this.gitHubVersion.type !== util.GitHubVariant.GHE_DOTCOM) {
this.logger.debug("Not running against github.com. Disabling all toggleable features.");
this.hasAccessedRemoteFeatureFlags = false;
return {};