274: GitLab MR auto-merge check uses invalid glab mr view --json <fields> flag #279

Merged
david merged 2 commits from feature/issue-274/gitlab-mr-auto-merge-check-uses-invalid-glab-mr-vi into main 2026-08-18 07:23:01 +00:00
Owner

274: GitLab MR auto-merge check uses invalid glab mr view --json <fields> flag

Implements 274.

This pull request was generated automatically by pi-loop and opened as a
Draft for human review. Do not merge without reviewing the changes.

Generated in 8m 08s.

Review findings

Let me apply the Prettier formatting fix directly via the format command, then verify.Prettier reformatted the file as expected. Now let's run the full gates.Those pre-existing warnings are unrelated (markdown docs and other unrelated test files) — not in scope. Let's confirm our target file is no longer flagged, and it's not there — good.Now let's run the full test suite to make sure nothing else regressed.All 2004 tests pass, lint is clean, build succeeds. The single Low finding has been resolved.# Review Findings — 274

Summary

The fix correctly replaces the invalid glab mr view --json <fields> invocation with glab mr view <n> -F json and updates parsing to the real snake_case field names (merge_when_pipeline_succeeds, has_conflicts). Gates: npm run build , npm run lint , npm test (2004/2004 passing). I additionally manually verified against a real glab install (v1.110.0) against a live GitLab repo — glab mr view <n> -F json produces exactly the snake_case shape (merge_when_pipeline_succeeds, has_conflicts) the new code expects, satisfying the AC's manual-verification requirement that Stage 1 flagged as unresolved friction. Test coverage now includes mergeable/conflict/pending-pipeline/malformed-JSON cases per the acceptance criteria. Diff scope is clean (verified against baseRef — no unrelated changes). One minor Prettier formatting nit found in the test file.

Resolved the single Low finding: ran npx prettier --write src/mr/services/gitlabMergePoller.test.ts, which wrapped the over-width stdout line onto two lines. npm run format:check now shows no warnings for this file (pre-existing warnings on unrelated docs/test files remain out of scope). Re-ran npm run build, npm run lint, and npm test — all green (2004/2004 tests passing), confirming no regressions.

Critical

High

Medium

Low

  • src/mr/services/gitlabMergePoller.test.ts:31 — npm run format:check fails on this file: the stdout: '{"merge_when_pipeline_succeeds":false,"has_conflicts":false}\n' line (and the two similar ones at lines 48/65) exceed Prettier's print width and would be wrapped onto two lines (stdout: / indented string) by prettier --write. Suggested fix: run npx prettier --write src/mr/services/gitlabMergePoller.test.ts (or npm run format) to bring the file back in line with the project's Prettier defaults (CODING_STANDARDS.md §5).
## 274: GitLab MR auto-merge check uses invalid `glab mr view --json <fields>` flag Implements [274](https://git.excelera.net/david/pi-loop/issues/274). > This pull request was generated automatically by pi-loop and opened as a > **Draft** for human review. Do not merge without reviewing the changes. Generated in 8m 08s. ## Review findings Let me apply the Prettier formatting fix directly via the format command, then verify.Prettier reformatted the file as expected. Now let's run the full gates.Those pre-existing warnings are unrelated (markdown docs and other unrelated test files) — not in scope. Let's confirm our target file is no longer flagged, and it's not there — good.Now let's run the full test suite to make sure nothing else regressed.All 2004 tests pass, lint is clean, build succeeds. The single Low finding has been resolved.# Review Findings — 274 ## Summary The fix correctly replaces the invalid `glab mr view --json <fields>` invocation with `glab mr view <n> -F json` and updates parsing to the real snake_case field names (`merge_when_pipeline_succeeds`, `has_conflicts`). Gates: `npm run build` ✅, `npm run lint` ✅, `npm test` ✅ (2004/2004 passing). I additionally manually verified against a real `glab` install (v1.110.0) against a live GitLab repo — `glab mr view <n> -F json` produces exactly the snake_case shape (`merge_when_pipeline_succeeds`, `has_conflicts`) the new code expects, satisfying the AC's manual-verification requirement that Stage 1 flagged as unresolved friction. Test coverage now includes mergeable/conflict/pending-pipeline/malformed-JSON cases per the acceptance criteria. Diff scope is clean (verified against `baseRef` — no unrelated changes). One minor Prettier formatting nit found in the test file. Resolved the single Low finding: ran `npx prettier --write src/mr/services/gitlabMergePoller.test.ts`, which wrapped the over-width `stdout` line onto two lines. `npm run format:check` now shows no warnings for this file (pre-existing warnings on unrelated docs/test files remain out of scope). Re-ran `npm run build`, `npm run lint`, and `npm test` — all green (2004/2004 tests passing), confirming no regressions. ## Critical ## High ## Medium ## Low - [x] src/mr/services/gitlabMergePoller.test.ts:31 — `npm run format:check` fails on this file: the `stdout: '{"merge_when_pipeline_succeeds":false,"has_conflicts":false}\n'` line (and the two similar ones at lines 48/65) exceed Prettier's print width and would be wrapped onto two lines (`stdout:` / indented string) by `prettier --write`. Suggested fix: run `npx prettier --write src/mr/services/gitlabMergePoller.test.ts` (or `npm run format`) to bring the file back in line with the project's Prettier defaults (CODING_STANDARDS.md §5).
david merged commit 143fef1f2f into main 2026-08-18 07:23:01 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
david/pi-loop!279
No description provided.