mirror of
https://github.com/github/codeql-action.git
synced 2026-05-10 07:40:28 +00:00
debug: sync js files and eliminate issues with lint
This commit is contained in:
Generated
+4
-1
@@ -352,7 +352,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 {};
|
||||
@@ -373,6 +374,7 @@ class GitHubFeatureFlags {
|
||||
this.logger.debug(` ${feature}: ${value}`);
|
||||
}
|
||||
this.hasAccessedRemoteFeatureFlags = true;
|
||||
this.logger.info(`[DEBUG] Got remote flags: ${JSON.stringify(remoteFlags)}`);
|
||||
return remoteFlags;
|
||||
}
|
||||
catch (e) {
|
||||
@@ -381,6 +383,7 @@ class GitHubFeatureFlags {
|
||||
"As a result, it will not be opted into any experimental features. " +
|
||||
"This could be because the Action is running on a pull request from a fork. If not, " +
|
||||
`please ensure the Action has the 'security-events: write' permission. Details: ${e.message}`);
|
||||
this.logger.info(`[DEBUG] Got HTTP error while retrieving remote flags`);
|
||||
this.hasAccessedRemoteFeatureFlags = false;
|
||||
return {};
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
+10
-3
@@ -491,7 +491,10 @@ class GitHubFeatureFlags {
|
||||
|
||||
private async loadApiResponse(): Promise<GitHubFeatureFlagsApiResponse> {
|
||||
// Do nothing when not running against github.com
|
||||
if (this.gitHubVersion.type !== util.GitHubVariant.DOTCOM && this.gitHubVersion.type !== util.GitHubVariant.GHE_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.",
|
||||
);
|
||||
@@ -522,7 +525,9 @@ class GitHubFeatureFlags {
|
||||
this.logger.debug(` ${feature}: ${value}`);
|
||||
}
|
||||
this.hasAccessedRemoteFeatureFlags = true;
|
||||
this.logger.info(`[DEBUG] Got remote flags: ${JSON.stringify(remoteFlags)}`);
|
||||
this.logger.info(
|
||||
`[DEBUG] Got remote flags: ${JSON.stringify(remoteFlags)}`,
|
||||
);
|
||||
return remoteFlags;
|
||||
} catch (e) {
|
||||
if (util.isHTTPError(e) && e.status === 403) {
|
||||
@@ -532,7 +537,9 @@ class GitHubFeatureFlags {
|
||||
"This could be because the Action is running on a pull request from a fork. If not, " +
|
||||
`please ensure the Action has the 'security-events: write' permission. Details: ${e.message}`,
|
||||
);
|
||||
this.logger.info(`[DEBUG] Got HTTP error while retrieving remote flags`);
|
||||
this.logger.info(
|
||||
`[DEBUG] Got HTTP error while retrieving remote flags`,
|
||||
);
|
||||
this.hasAccessedRemoteFeatureFlags = false;
|
||||
return {};
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user