Skip to content

Commit 87c2e6d

Browse files
authored
feat: collapse toggle for summary (#289)
1 parent e5d3afd commit 87c2e6d

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
@@ -247,7 +247,11 @@ class JobSummary {
247247
});
248248
}
249249
static wrapContent(fileContent) {
250-
return this.getMarkdownHeader() + fileContent + this.getMarkdownFooter();
250+
return ('<details>\n\n<summary>JFrog Job Summary</summary>\n\n' +
251+
this.getMarkdownHeader() +
252+
fileContent +
253+
this.getMarkdownFooter() +
254+
'\n\n</details>');
251255
}
252256
static getMarkdownFooter() {
253257
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
@@ -251,7 +251,13 @@ export class JobSummary {
251251
}
252252

253253
private static wrapContent(fileContent: string) {
254-
return this.getMarkdownHeader() + fileContent + this.getMarkdownFooter();
254+
return (
255+
'<details>\n\n<summary>JFrog Job Summary</summary>\n\n' +
256+
this.getMarkdownHeader() +
257+
fileContent +
258+
this.getMarkdownFooter() +
259+
'\n\n</details>'
260+
);
255261
}
256262

257263
private static getMarkdownFooter() {

0 commit comments

Comments
 (0)