fix(action): allow forward sync from trailer commits

This commit is contained in:
2026-06-08 13:29:31 +01:00
parent 427cc4c3f1
commit ac0b9b4ea3
6 changed files with 30 additions and 19 deletions

17
tests/unit/action.bats Normal file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bats
# tests/unit/action.bats — Composite action regression tests
setup() {
JOSH_SYNC_ROOT="$(cd "$BATS_TEST_DIRNAME/../.." && pwd)"
ACTION_FILE="${JOSH_SYNC_ROOT}/action.yml"
}
@test "forward sync is not globally skipped when HEAD has the sync trailer" {
! grep -q "Loop guard (forward)" "$ACTION_FILE"
! grep -q "HEAD commit has sync trailer" "$ACTION_FILE"
! grep -q "steps.guard.outputs.skip" "$ACTION_FILE"
}
@test "composite action still invokes the josh-sync CLI" {
grep -q "josh-sync sync" "$ACTION_FILE"
}