Skip to content

Commit 71036b6

Browse files
authored
Merge pull request #10 from egibs/really-fix-json
Fix JSON details by avoiding collapsible details
2 parents 4c7566e + c386003 commit 71036b6

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

dist/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34574,10 +34574,8 @@ async function run() {
3457434574
// Write to workflow summary for non-PR contexts
3457534575
await core.summary
3457634576
.addRaw(diffSummary)
34577-
.addDetails(
34578-
'View detailed report\n',
34579-
'```json\n' + JSON.stringify(diff, null, 2).substring(0, 60000) + '\n```'
34580-
)
34577+
.addHeading('Detailed Report', 3)
34578+
.addCodeBlock(JSON.stringify(diff, null, 2).substring(0, 60000), 'json')
3458134579
.write();
3458234580
core.info('Malcontent findings written to workflow summary');
3458334581
}

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,8 @@ async function run() {
192192
// Write to workflow summary for non-PR contexts
193193
await core.summary
194194
.addRaw(diffSummary)
195-
.addDetails(
196-
'View detailed report\n',
197-
'```json\n' + JSON.stringify(diff, null, 2).substring(0, 60000) + '\n```'
198-
)
195+
.addHeading('Detailed Report', 3)
196+
.addCodeBlock(JSON.stringify(diff, null, 2).substring(0, 60000), 'json')
199197
.write();
200198
core.info('Malcontent findings written to workflow summary');
201199
}

0 commit comments

Comments
 (0)