Skip to content

fix(gh-wrapper): refuse GraphQL enablePullRequestAutoMerge - #446

Merged
twistedmelonman merged 1 commit into
mainfrom
claude/fix-automerge-gql-055823
Oct 20, 2026
Merged

twistedmelonman merged 1 commit into
mainfrom
claude/fix-automerge-gql-055823

Conversation

@twistedmelonman

Copy link
Copy Markdown
Member

Adds enablePullRequestAutoMerge to the GraphQL mutation guard in bash/gh-wrapper.sh.

Auto-merge lets a PR merge later without the merge-lock or pre-merge review, so it is refused with the same message as mergePullRequest. It is read from inline fields, -F query=@file and --input, like the #445 merge cases.

Tests: three new cases per mode in bash/tests/test-gh-wrapper-off-org-guards.sh. They fail on origin/main (6 failures) and pass with the change.

gh pr merge --auto is unchanged: the wrapper treats --auto as a plain boolean flag on pr merge, so it already runs pre-merge-review.sh and its merge-lock check.

Turning on auto-merge through `gh api graphql` lets a PR merge later
without the merge-lock or pre-merge review. The GraphQL guard from #391
and #444 refused mergePullRequest but not this mutation. Add it to the
same pattern and refuse it with the merge message, for inline queries,
-F query=@file and --input.
@twistedmelonman
twistedmelonman merged commit a59c682 into main Oct 20, 2026
5 checks passed
@twistedmelonman
twistedmelonman deleted the claude/fix-automerge-gql-055823 branch October 20, 2026 15:14
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.

1 participant