Skip to content

Commit 863a05b

Browse files
authored
Nest alertCounts object in event_report.properties (#1770)
1 parent d6c8719 commit 863a05b

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed

lib/analyze.js

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

lib/analyze.js.map

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

lib/analyze.test.js

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

lib/analyze.test.js.map

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

src/analyze.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ test("status report fields and search path setting", async (t) => {
175175
if (builtinStatusReport.event_reports) {
176176
for (const eventReport of builtinStatusReport.event_reports) {
177177
t.deepEqual(eventReport.event, "codeql database interpret-results");
178+
t.true("properties" in eventReport);
179+
t.true("alertCounts" in eventReport.properties!);
178180
}
179181
}
180182

@@ -214,6 +216,8 @@ test("status report fields and search path setting", async (t) => {
214216
if (customStatusReport.event_reports) {
215217
for (const eventReport of customStatusReport.event_reports) {
216218
t.deepEqual(eventReport.event, "codeql database interpret-results");
219+
t.true("properties" in eventReport);
220+
t.true("alertCounts" in eventReport.properties!);
217221
}
218222
}
219223
}

src/analyze.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,9 @@ export async function runQueries(
372372
completed_at: endTimeInterpretResults.toISOString(),
373373
exit_status: "success",
374374
language,
375-
properties: perQueryAlertCounts,
375+
properties: {
376+
alertCounts: perQueryAlertCounts,
377+
},
376378
};
377379

378380
if (statusReport["event_reports"] === undefined) {

0 commit comments

Comments
 (0)