Skip to content

fix: misleading summary failure header#96

Merged
joshjohanning merged 2 commits into
mainfrom
joshjohanning/hide-summary-table-option
May 30, 2026
Merged

fix: misleading summary failure header#96
joshjohanning merged 2 commits into
mainfrom
joshjohanning/hide-summary-table-option

Conversation

@joshjohanning

@joshjohanning joshjohanning commented May 29, 2026

Copy link
Copy Markdown
Owner

Why

Issue #94 calls out that the job summary title can say "Failed" even when the run is configured not to fail on mutable findings. That headline is misleading because it conflates "findings detected" with an actual failing run.

What changed

The summary heading now reflects the real run outcome. There are three cases:

Situation Heading
No mutable or unsupported actions found ✅ Immutable Actions Check - All Passed
Mutable actions found and fail-on-mutable is true (run actually fails) ❌ Immutable Actions Check - Failed
Anything else found (mutable but not failing, or unsupported references that need manual review) ⚠️ Immutable Actions Check - Findings Detected

The key fix: ❌ Failed now only appears when the run truly fails. Previously a non-failing run with findings could still show a "Failed" header.

Tests were updated to assert each heading scenario in action execution flows.

Notes

This keeps existing all-passed output behavior intact and only fixes summary wording semantics.

Closes #94

Copilot AI review requested due to automatic review settings May 29, 2026 23:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the GitHub Actions job summary header so it reflects the actual run outcome (pass vs. actionable failure) instead of treating any findings as a failure, aligning with Issue #94’s goal to distinguish “findings detected” from a failing run.

Changes:

  • Adjusted summary heading selection to show Passed, Findings Detected, or Failed based on whether the run will truly fail (fail-on-mutable + mutable findings).
  • Updated action execution tests to assert the correct summary heading in pass/fail/non-failing-findings scenarios.
  • Bumped package version to 2.6.1 (with lockfile + coverage badge update).
Show a summary per file
File Description
src/index.js Updates job summary header logic to accurately reflect pass vs findings vs failure.
__tests__/index.test.js Adds assertions for the expected job summary header across key execution paths.
package.json Bumps version to 2.6.1 for a user-visible behavior change.
package-lock.json Syncs lockfile version metadata with the package version bump.
badges/coverage.svg Updates the coverage badge to match current test coverage output.

Copilot's findings

  • Files reviewed: 3/5 changed files
  • Comments generated: 1

Comment thread src/index.js Outdated
@joshjohanning joshjohanning changed the title Fix misleading summary failure header fix: misleading summary failure header May 30, 2026
joshjohanning and others added 2 commits May 30, 2026 13:48
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…able

The final else branch was unreachable since hasFindings is the logical
complement of allPassed for non-negative array lengths. Remove the unused
variable and simplify the conditional to improve code clarity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@joshjohanning joshjohanning force-pushed the joshjohanning/hide-summary-table-option branch from 211ff4d to 421885e Compare May 30, 2026 18:49
@joshjohanning joshjohanning merged commit 4c2e6ed into main May 30, 2026
4 checks passed
@joshjohanning joshjohanning deleted the joshjohanning/hide-summary-table-option branch May 30, 2026 19:30
@github-actions

Copy link
Copy Markdown

📦 Draft Release Created

A draft release v2.6.1 has been created for this PR.

🔗 View Draft Release

Next Steps

  • Review the release notes
  • Publish the release to make it permanent

This is an automated reminder from the publish-github-action workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow-up to #92: fix misleading summary failure header

2 participants