Skip to content

Commit 806fc12

Browse files
committed
Reword changelog entry and add back test
1 parent ba352d3 commit 806fc12

4 files changed

+35
-2
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [UNRELEASED]
44

5-
- Add better error message is the workflow does not have the `security-events: write` permission. [#882](https://github.com/github/codeql-action/pull/882)
5+
- Add a better warning message stating that experimental features will be disabled if the workflow has been triggered by a pull request from a fork or the `security-events: write` permission is not present. [#882](https://github.com/github/codeql-action/pull/882)
66

77
## 1.0.30 - 24 Jan 2022
88

lib/feature-flags.test.js

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/feature-flags.test.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/feature-flags.test.ts

+23
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,29 @@ test("Feature flags are disabled if they're not returned in API response", async
102102
});
103103
});
104104

105+
test("Feature flags exception is propagated if the API request errors", async (t) => {
106+
await withTmpDir(async (tmpDir) => {
107+
setupActionsVars(tmpDir, tmpDir);
108+
109+
const featureFlags = new GitHubFeatureFlags(
110+
{ type: GitHubVariant.DOTCOM },
111+
testApiDetails,
112+
testRepositoryNwo,
113+
getRunnerLogger(true)
114+
);
115+
116+
mockFeatureFlagApiEndpoint(500, {});
117+
118+
await t.throwsAsync(
119+
async () => featureFlags.getValue(FeatureFlag.DatabaseUploadsEnabled),
120+
{
121+
message:
122+
"Encountered an error while trying to load feature flags: Error: some error message",
123+
}
124+
);
125+
});
126+
});
127+
105128
const FEATURE_FLAGS = [
106129
"database_uploads_enabled",
107130
"ml_powered_queries_enabled",

0 commit comments

Comments
 (0)