Skip to content

Commit

Permalink
Fix lint errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
criemen committed Jul 18, 2022
1 parent 75afbf4 commit c059f95
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/feature-flags.js.map

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

2 changes: 1 addition & 1 deletion lib/feature-flags.test.js.map

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

16 changes: 8 additions & 8 deletions src/feature-flags.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ const ALL_FEATURE_FLAGS_DISABLED_VARIANTS: Array<{
description: string;
gitHubVersion: util.GitHubVersion;
}> = [
{
description: "GHES",
gitHubVersion: { type: GitHubVariant.GHES, version: "3.0.0" },
},
{ description: "GHAE", gitHubVersion: { type: GitHubVariant.GHAE } },
];
{
description: "GHES",
gitHubVersion: { type: GitHubVariant.GHES, version: "3.0.0" },
},
{ description: "GHAE", gitHubVersion: { type: GitHubVariant.GHAE } },
];

for (const variant of ALL_FEATURE_FLAGS_DISABLED_VARIANTS) {
test(`All feature flags are disabled if running against ${variant.description}`, async (t) => {
Expand All @@ -60,7 +60,7 @@ for (const variant of ALL_FEATURE_FLAGS_DISABLED_VARIANTS) {
(v: LoggedMessage) =>
v.type === "debug" &&
v.message ===
"Not running against github.com. Disabling all feature flags."
"Not running against github.com. Disabling all feature flags."
) !== undefined
);
});
Expand Down Expand Up @@ -122,7 +122,7 @@ test("Feature flags are disabled if they're not returned in API response", async
(v: LoggedMessage) =>
v.type === "debug" &&
v.message ===
`Feature flag '${featureFlag}' undefined in API response, considering it disabled.`
`Feature flag '${featureFlag}' undefined in API response, considering it disabled.`
) !== undefined
);
}
Expand Down
8 changes: 4 additions & 4 deletions src/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class GitHubFeatureFlags implements FeatureFlags {
private apiDetails: GitHubApiDetails,
private repositoryNwo: RepositoryNwo,
private logger: Logger
) { }
) {}

async getValue(flag: FeatureFlag): Promise<boolean> {
const response = await this.getApiResponse();
Expand Down Expand Up @@ -71,9 +71,9 @@ export class GitHubFeatureFlags implements FeatureFlags {
if (util.isHTTPError(e) && e.status === 403) {
this.logger.warning(
"This run of the CodeQL Action does not have permission to access Code Scanning API endpoints. " +
"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}`
"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}`
);
} else {
// Some feature flags, such as `ml_powered_queries_enabled` affect the produced alerts.
Expand Down

0 comments on commit c059f95

Please sign in to comment.