Skip to content

Commit

Permalink
test: wrap gas report in details (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra authored Nov 12, 2024
1 parent 5e3526c commit 2fb7840
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:

- name: Prepare comment
run: |
printf ":fuelpump: **Gas report**\n\n" > /tmp/template.md
printf '%s' "${{ steps.gas.outputs.gas-report }}" >> /tmp/template.md
printf '%s' "${{ steps.gas.outputs.gas-report }}" > /tmp/template.md
- name: Find Comment
uses: peter-evans/find-comment@v3
Expand Down
9 changes: 8 additions & 1 deletion dist/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -24026,7 +24026,14 @@ var table = getHtmlGasReport(rootContent, currentContent, {
rootUrl: `${import_github.context.payload.repository?.html_url}/blob/${import_github.context.sha}/`,
ignoreUnchanged: (0, import_core.getInput)("ignoreUnchanged") === "true"
});
(0, import_core.setOutput)("gas-report", table);
(0, import_core.setOutput)(
"gas-report",
`<details><summary>:fuelpump: <strong>Gas report</strong></summary>

${table}

</details>`
);
/*! Bundled license information:

undici/lib/fetch/body.js:
Expand Down
9 changes: 8 additions & 1 deletion dist/action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24031,7 +24031,14 @@ var table = getHtmlGasReport(rootContent, currentContent, {
rootUrl: `${import_github.context.payload.repository?.html_url}/blob/${import_github.context.sha}/`,
ignoreUnchanged: (0, import_core.getInput)("ignoreUnchanged") === "true"
});
(0, import_core.setOutput)("gas-report", table);
(0, import_core.setOutput)(
"gas-report",
`<details><summary>:fuelpump: <strong>Gas report</strong></summary>

${table}

</details>`
);
/*! Bundled license information:

undici/lib/fetch/body.js:
Expand Down
5 changes: 4 additions & 1 deletion src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ const table = getHtmlGasReport(rootContent, currentContent, {
ignoreUnchanged: getInput("ignoreUnchanged") === "true",
});

setOutput("gas-report", table);
setOutput(
"gas-report",
`<details><summary>:fuelpump: <strong>Gas report</strong></summary>\n\n${table}\n\n</details>`,
);

0 comments on commit 2fb7840

Please sign in to comment.