fix(gh): pass through gh pr merge instead of canned response (#938)#980
Merged
fix(gh): pass through gh pr merge instead of canned response (#938)#980
Conversation
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>
Contributor
|
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. |
Contributor
|
After looking in git merge output follow up is not prioritary, not much to compress, merging this |
aeppling
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
run_filteredwithrun_passthroughforgh pr mergeghoutput instead of hardcoded "ok merged"Problem
pr_merge()usedrun_filteredwith a filter function that ignored stdout and always returnedok_confirmation("merged", ...). AI agents believed PRs were merged when they weren't — PRs remained OPEN while output said "ok merged".Fix
Switch to
run_passthrough—gh pr mergeis a destructive action, the user/agent must see real output.-25/+7lines.Fixes #938
Test plan
cargo fmt --all— cleancargo clippy --all-targets— no new warningscargo test gh_cmd— 52 tests passed