Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/api-client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/api-client.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as retry from "@octokit/plugin-retry";
import consoleLogLevel from "console-log-level";

import { getActionVersion, getRequiredInput } from "./actions-util";
import { getRunnerLogger } from "./logging";
import { parseRepositoryNwo } from "./repository";
import {
ConfigurationError,
Expand Down Expand Up @@ -116,6 +117,9 @@ export async function getGitHubVersion(): Promise<GitHubVersion> {
getApiDetails(),
);
}
getRunnerLogger(true).info(JSON.stringify(cachedGitHubVersion));
getRunnerLogger(true).info(getApiDetails().url);
getRunnerLogger(true).info(getApiDetails().apiURL);
return cachedGitHubVersion;
}

Expand Down
4 changes: 3 additions & 1 deletion src/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@

private async loadApiResponse(): Promise<GitHubFeatureFlagsApiResponse> {
// 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.",
);
Expand Down Expand Up @@ -522,6 +522,7 @@
this.logger.debug(` ${feature}: ${value}`);
}
this.hasAccessedRemoteFeatureFlags = true;
this.logger.info(`[DEBUG] Got remote flags: ${JSON.stringify(remoteFlags)}`);
return remoteFlags;
} catch (e) {
if (util.isHTTPError(e) && e.status === 403) {
Expand All @@ -531,6 +532,7 @@
"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 {};
} else {
Expand Down
Loading