Skip to content

Commit 8fc92e6

Browse files
committed
Testing: record summary diagnostic
1 parent e0cf05a commit 8fc92e6

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

lib/init-action.js

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

src/init-action.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,26 @@ async function run(startedAt: Date) {
741741
}
742742
}
743743

744+
addDiagnostic(
745+
config,
746+
// Arbitrarily choose the first language. We could also choose all languages, but that
747+
// increases the risk of misinterpreting the data.
748+
config.languages[0],
749+
makeDiagnostic(
750+
"codeql-action/init/test",
751+
"Test diagnostic from init action",
752+
{
753+
markdownMessage:
754+
"This is a diagnostic to test how the diagnostic summary interacts with this PR.",
755+
visibility: {
756+
statusPage: false,
757+
telemetry: false,
758+
cliSummaryTable: true,
759+
},
760+
},
761+
),
762+
);
763+
744764
// Write diagnostics to the database that we previously stored in memory because the database
745765
// did not exist until now.
746766
flushDiagnostics(config);

0 commit comments

Comments
 (0)