refactor(action): Extract diff shell into action/diff.sh#92
Merged
Conversation
The composite action's inline shell for `relune diff` is moved to a dedicated `action/diff.sh` file so the next step (review mode) can drop in alongside it without making `action.yaml` unwieldy. Behavior is unchanged: same env contract, same output-path derivation, same exit code mapping (rc 10 -> has-changes=true, rc 0 -> false, otherwise fail).
Code Metrics Report
Details | | main (c74d3e2) | #92 (64d55b3) | +/- |
|---------------------|----------------|---------------|------|
| Coverage | 94.6% | 94.6% | 0.0% |
| Files | 81 | 81 | 0 |
| Lines | 36827 | 36827 | 0 |
| Covered | 34864 | 34864 | 0 |
- | Test Execution Time | 1m28s | 2m11s | +43s |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
action/action.yamlintoaction/diff.sh. Behavior is unchanged.mode: review. Keeping both diff and review inline shells inaction.yamlwould hurt readability, so the diff side is split out first.review.shis not added in this PR — it will land together with themode: reviewimplementation PR.Changes
action/diff.shand port the current inline shell verbatim (env contract, output-path derivation, and exit code mapping are all identical).action.yamlwith abash "\${{ github.action_path }}/diff.sh"invocation.has-changes,output-path, and error-exit behavior match the current implementation.