Skip to content

refactor(action): Extract diff shell into action/diff.sh#92

Merged
mhiro2 merged 1 commit into
mainfrom
refactor/action-extract-diff-sh
Apr 28, 2026
Merged

refactor(action): Extract diff shell into action/diff.sh#92
mhiro2 merged 1 commit into
mainfrom
refactor/action-extract-diff-sh

Conversation

@mhiro2

@mhiro2 mhiro2 commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Pure refactor that extracts the inline shell from action/action.yaml into action/diff.sh. Behavior is unchanged.
  • Groundwork for the upcoming mode: review. Keeping both diff and review inline shells in action.yaml would hurt readability, so the diff side is split out first. review.sh is not added in this PR — it will land together with the mode: review implementation PR.

Changes

  • 35799a4 : refactor(action): extract diff shell into action/diff.sh
    • Add action/diff.sh and port the current inline shell verbatim (env contract, output-path derivation, and exit code mapping are all identical).
    • Replace the Run relune diff step in action.yaml with a bash "\${{ github.action_path }}/diff.sh" invocation.
    • Smoke-checked four cases locally — identical / different schemas / custom output-path / nonexistent file — and confirmed has-changes, output-path, and error-exit behavior match the current implementation.

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).
@mhiro2 mhiro2 self-assigned this Apr 28, 2026
@github-actions

Copy link
Copy Markdown

Code Metrics Report

main (c74d3e2) #92 (64d55b3) +/-
Coverage 94.6% 94.6% 0.0%
Test Execution Time 1m28s 2m11s +43s
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

@mhiro2
mhiro2 merged commit 3d610d9 into main Apr 28, 2026
5 checks passed
@mhiro2
mhiro2 deleted the refactor/action-extract-diff-sh branch April 28, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant