Skip to content

fix(gh): pass through gh pr merge instead of canned response (#938)#980

Merged
aeppling merged 1 commit intodevelopfrom
fix/gh-pr-merge-canned
Apr 3, 2026
Merged

fix(gh): pass through gh pr merge instead of canned response (#938)#980
aeppling merged 1 commit intodevelopfrom
fix/gh-pr-merge-canned

Conversation

@pszymkowiak
Copy link
Copy Markdown
Collaborator

Summary

  • Replace run_filtered with run_passthrough for gh pr merge
  • Shows real gh output instead of hardcoded "ok merged"

Problem

pr_merge() used run_filtered with a filter function that ignored stdout and always returned ok_confirmation("merged", ...). AI agents believed PRs were merged when they weren't — PRs remained OPEN while output said "ok merged".

Fix

Switch to run_passthroughgh pr merge is a destructive action, the user/agent must see real output. -25/+7 lines.

Fixes #938

Test plan

  • cargo fmt --all — clean
  • cargo clippy --all-targets — no new warnings
  • cargo test gh_cmd — 52 tests passed

pr_merge() was using run_filtered with a filter_fn that ignored stdout
and always returned "ok merged". This made AI agents believe PRs were
merged when they weren't.

Switch to run_passthrough so the real gh output is shown. gh pr merge
is a destructive action — the user must see exactly what happened.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
@aeppling
Copy link
Copy Markdown
Contributor

aeppling commented Apr 3, 2026

Hey

We need to look how we could compress git merge outputs and avoid returning this static response instead of executing commands/flags.

Fix is correct since it bypass all, but as a follow-up we should then find a way to correctly handle this.

@aeppling
Copy link
Copy Markdown
Contributor

aeppling commented Apr 3, 2026

After looking in git merge output follow up is not prioritary, not much to compress, merging this

@aeppling aeppling merged commit 8465ca9 into develop Apr 3, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants