Skip to content

Commit

Permalink
Always include steps in summary
Browse files Browse the repository at this point in the history
  • Loading branch information
emcfarlane committed Jul 3, 2024
1 parent 48f9380 commit 8462484
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
script: |
const expectedComment = `The latest Buf updates on your PR.
<table><tr><th>Name</th><th>Status</th></tr><tr><td>build</td><td>✅ passed</td></tr><tr><td>format</td><td>❌ failed</td></tr><tr><td>breaking</td><td>✅ passed</td></tr></table>
<table><tr><th>Name</th><th>Status</th></tr><tr><td>build</td><td>✅ passed</td></tr><tr><td>lint</td><td>⏩ skipped</td></tr><tr><td>format</td><td>❌ failed</td></tr><tr><td>breaking</td><td>✅ passed</td></tr></table>
<!-- Buf results -->`
const commentTag = "<!-- Buf results -->";
const { owner, repo } = context.repo;
Expand Down
9 changes: 3 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54239,13 +54239,10 @@ function createSummary(inputs, steps) {
{ data: "Status", header: true },
],
["build", message(steps.build?.status)],
["lint", message(steps.lint?.status)],
["format", message(steps.format?.status)],
["breaking", message(steps.breaking?.status)],
];
if (inputs.lint)
table.push(["lint", message(steps.lint?.status)]);
if (inputs.format)
table.push(["format", message(steps.format?.status)]);
if (inputs.breaking)
table.push(["breaking", message(steps.breaking?.status)]);
if (inputs.push)
table.push(["push", message(steps.push?.status)]);
if (inputs.archive)
Expand Down
7 changes: 3 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,10 @@ function createSummary(inputs: Inputs, steps: Steps): typeof core.summary {
{ data: "Status", header: true },
],
["build", message(steps.build?.status)],
["lint", message(steps.lint?.status)],
["format", message(steps.format?.status)],
["breaking", message(steps.breaking?.status)],
];
if (inputs.lint) table.push(["lint", message(steps.lint?.status)]);
if (inputs.format) table.push(["format", message(steps.format?.status)]);
if (inputs.breaking)
table.push(["breaking", message(steps.breaking?.status)]);
if (inputs.push) table.push(["push", message(steps.push?.status)]);
if (inputs.archive) table.push(["archive", message(steps.archive?.status)]);
return core.summary.addTable(table);
Expand Down

0 comments on commit 8462484

Please sign in to comment.