fix: misleading summary failure header#96
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
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>
211ff4d to
421885e
Compare
📦 Draft Release CreatedA draft release v2.6.1 has been created for this PR. Next Steps
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
✅ Immutable Actions Check - All Passedfail-on-mutableistrue(run actually fails)❌ Immutable Actions Check - Failed⚠️ Immutable Actions Check - Findings DetectedThe key fix:
❌ Failednow 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-passedoutput behavior intact and only fixes summary wording semantics.Closes #94