Skip to content

Commit 9fe9088

Browse files
committed
Report undefined when FFs are unavailable
1 parent 1bfa34a commit 9fe9088

File tree

9 files changed

+54
-27
lines changed

9 files changed

+54
-27
lines changed

lib/analyze-action.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/autobuild-action.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/resolve-environment-action.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/setup-codeql-action.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/start-proxy-action.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-sarif-action.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/status-report.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,12 @@ export async function createStatusReportBase(
308308
const isSteadyStateDefaultSetupRun =
309309
process.env["CODE_SCANNING_IS_STEADY_STATE_DEFAULT_SETUP"] === "true";
310310

311-
const featureFlags: QueriedFeatureStatusReport[] = Object.entries(
312-
queriedFeatures || {},
313-
).map(([feature, outcome]) => ({ feature, ...outcome }));
311+
let featureFlags: QueriedFeatureStatusReport[] | undefined = undefined;
312+
if (queriedFeatures) {
313+
featureFlags = Object.entries(queriedFeatures).map(
314+
([feature, outcome]) => ({ feature, ...outcome }),
315+
);
316+
}
314317

315318
const statusReport: StatusReportBase = {
316319
action_name: actionName,

0 commit comments

Comments
 (0)