Skip to content

Commit d74ba4c

Browse files
committed
feat: collapse toggle for summary
1 parent 0775fb3 commit d74ba4c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/job-summary.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,11 @@ class JobSummary {
242242
});
243243
}
244244
static wrapContent(fileContent) {
245-
return this.getMarkdownHeader() + fileContent + this.getMarkdownFooter();
245+
return ('<details>\n\n<summary>JFrog Job Summary</summary>\n\n' +
246+
this.getMarkdownHeader() +
247+
fileContent +
248+
this.getMarkdownFooter() +
249+
'\n\n</details>');
246250
}
247251
static getMarkdownFooter() {
248252
return `${this.getUsageBadge()} \n\n # \n\n The above Job Summary was generated by the <a href="https://github.com/marketplace/actions/setup-jfrog-cli"> Setup JFrog CLI GitHub Action </a>`;

src/job-summary.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,13 @@ export class JobSummary {
244244
}
245245

246246
private static wrapContent(fileContent: string) {
247-
return this.getMarkdownHeader() + fileContent + this.getMarkdownFooter();
247+
return (
248+
'<details>\n\n<summary>JFrog Job Summary</summary>\n\n' +
249+
this.getMarkdownHeader() +
250+
fileContent +
251+
this.getMarkdownFooter() +
252+
'\n\n</details>'
253+
);
248254
}
249255

250256
private static getMarkdownFooter() {

0 commit comments

Comments
 (0)