fix: tolerate other GitHub variants when retrieving feature flags from GitHub API
This commit is contained in:
parent
b91f43b4e4
commit
1a02ac9a03
3 changed files with 7 additions and 3 deletions
3
lib/feature-flags.js
generated
3
lib/feature-flags.js
generated
|
|
@ -346,7 +346,8 @@ class GitHubFeatureFlags {
|
||||||
}
|
}
|
||||||
async loadApiResponse() {
|
async loadApiResponse() {
|
||||||
// Do nothing when not running against github.com
|
// 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.logger.debug("Not running against github.com. Disabling all toggleable features.");
|
||||||
this.hasAccessedRemoteFeatureFlags = false;
|
this.hasAccessedRemoteFeatureFlags = false;
|
||||||
return {};
|
return {};
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -485,7 +485,10 @@ class GitHubFeatureFlags {
|
||||||
|
|
||||||
private async loadApiResponse(): Promise<GitHubFeatureFlagsApiResponse> {
|
private async loadApiResponse(): Promise<GitHubFeatureFlagsApiResponse> {
|
||||||
// Do nothing when not running against github.com
|
// 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(
|
this.logger.debug(
|
||||||
"Not running against github.com. Disabling all toggleable features.",
|
"Not running against github.com. Disabling all toggleable features.",
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue