Skip to content

Commit 8733304

Browse files
committed
feat: wrangler output comment code block
1 parent 8004380 commit 8733304

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

__tests__/github/comment.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('addComment', () => {
3030
query: MutationAddComment,
3131
variables: {
3232
subjectId: 'MDExOlB1bGxSZXF1ZXN0Mjc5MTQ3NDM3',
33-
body: '## Cloudflare Pages Deployment\n **Environment:** production \n **Project:** cloudflare-pages-action \n **Built with commit:** mock-github-sha\n **Preview URL:** https://206e215c.cloudflare-pages-action-a5z.pages.dev \n **Branch Preview URL:** https://unknown-branch.cloudflare-pages-action-a5z.pages.dev \n <details><summary>Wrangler Output:</summary>success</details>'
33+
body: '## Cloudflare Pages Deployment\n **Environment:** production \n **Project:** cloudflare-pages-action \n **Built with commit:** mock-github-sha\n **Preview URL:** https://206e215c.cloudflare-pages-action-a5z.pages.dev \n **Branch Preview URL:** https://unknown-branch.cloudflare-pages-action-a5z.pages.dev \n <details><summary>Wrangler Output:</summary>```success```</details>'
3434
}
3535
},
3636
{

dist/index.js

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

dist/index.js.map

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

src/github/comment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export const addComment = async (
3737
deployment.project_name
3838
} \n **Built with commit:** ${sha}\n **Preview URL:** ${
3939
deployment.url
40-
} \n **Branch Preview URL:** ${getCloudflareDeploymentAlias(deployment)} \n <details><summary>Wrangler Output:</summary>${output}</details>`
41-
// TODO: improve output
40+
} \n **Branch Preview URL:** ${getCloudflareDeploymentAlias(deployment)} \n <details><summary>Wrangler Output:</summary>\`\`\`${output}\`\`\`</details>`
41+
4242
const comment = await request({
4343
query: MutationAddComment,
4444
variables: {

0 commit comments

Comments
 (0)