feat(action): Add review mode with two-pass summary and CI smoke tests#93
Merged
Conversation
Add `mode: diff | review` input to action.yaml and a new review.sh that runs `relune review` twice — once with the user's --deny / filters to drive has-blocking-findings via rc=10, then again without --deny to a JSON summary path so has-findings and summary-* outputs reflect the true finding set even when no threshold is configured. The summary pass fails the action on any non-zero rc to avoid emitting broken outputs. Also propagate the new `dialect` input to the existing diff path so the flag is not silently review-only.
Cover the four review outcomes (no findings, warning only, blocking without fail, blocking with fail-on-blocking) plus an invalid-mode case. The fail-on-blocking and invalid-mode steps use continue-on-error so the workflow can assert on `steps.X.outcome` instead of crashing on the expected non-zero exit.
This comment has been minimized.
This comment has been minimized.
The composite action now covers both `relune diff` and `relune review`, so the marketplace name and description should call out both modes instead of advertising only the diff path.
Code Metrics Report
Details | | main (3d610d9) | #93 (737b77a) | +/- |
|---------------------|----------------|---------------|------|
| Coverage | 94.6% | 94.6% | 0.0% |
| Files | 81 | 81 | 0 |
| Lines | 36827 | 36827 | 0 |
| Covered | 34864 | 34864 | 0 |
- | Test Execution Time | 1m34s | 1m36s | +2s |Reported by octocov |
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.
Summary
mode: diff | reviewswitch toaction/action.yamlso the same composite action can either render a schema diff (existing default) or runrelune reviewfor migration risk reporting.has-findings,has-blocking-findings,summary-{breaking,caution,warning,info}) from a dedicated summary pass that re-runs the CLI without--deny, keeping outputs accurate when the user pass exits with rc=10.dialectinput to the existing diff path so the flag is not silently review-only..github/workflows/test-action.yamlwith no-findings, warning-only, blocking, fail-on-blocking, and invalid-mode cases.Changes
mode, expose review inputs (deny,rules,except-rules,except-tables,dialect,fail-on-blocking) and the new outputs, and keephas-changesworking unchanged for diff users.action/review.shthat runs the user-facing review with all filters first, then a JSON-only summary pass without--denywhose rc must be 0; aggregate counts viajqand only exit non-zero whenfail-on-blocking=trueand a blocking finding was detected.action/diff.shto forward--dialectwhenever the input is set and notauto, so both modes honor the dialect input consistently.continue-on-error: trueon the steps that are expected to fail and assert onsteps.X.outcomeso a real regression still breaks the workflow.nameanddescriptionso the marketplace listing advertises bothrelune diffandrelune reviewrather than the diff path only.