Skip to content

Commit 3314aa6

Browse files
Phlogistiqueclaude
andauthored
Fix e2e merge-command assertion broken by the ff-only step (#44)
Since #40 the conflict comment's fast-forward step reads `git merge --ff-only origin/<branch>`, which `assert_conflict_comment_merges` picks up with its `^git merge` grep, so the extracted commands never match the expected conflict merges and the check fails on every conflict scenario. #40's test tweak only handled the new `# ...` hash gloss, not the new merge line. This went unnoticed because `tests.yml` only runs on `pull_request`, so the breakage only surfaced on the first PR after #40 landed (#42, [run 27235483781](https://github.com/scortexio/autorestack-action/actions/runs/27235483781)). Fix: skip the `--ff-only` line when extracting merge commands. Verified green as part of #42's [run 27235912022](https://github.com/scortexio/autorestack-action/actions/runs/27235912022) before being split out into this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01JHvKryT4QUpHYdNq9YEQxX --- _Generated by [Claude Code](https://claude.ai/code/session_01JHvKryT4QUpHYdNq9YEQxX)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2d2469a commit 3314aa6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_e2e.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ assert_conflict_comment_merges() {
291291
expected+="git merge $conflict"$'\n'
292292
done
293293
expected=${expected%$'\n'}
294-
actual=$(echo "$comment" | grep -E '^git merge' | sed 's/ *#.*//' || true)
294+
actual=$(echo "$comment" | grep -E '^git merge' | grep -v -- '--ff-only' | sed 's/ *#.*//' || true)
295295

296296
if [[ "$actual" == "$expected" ]]; then
297297
echo >&2 "✅ Verification Passed: conflict comment lists expected merge command(s)."

0 commit comments

Comments
 (0)