Skip to content

fix disable auto-merge mutation name#31

Merged
AntonNiklasson merged 1 commit into
mainfrom
an/fix-disable-auto-merge-mutation
May 13, 2026
Merged

fix disable auto-merge mutation name#31
AntonNiklasson merged 1 commit into
mainfrom
an/fix-disable-auto-merge-mutation

Conversation

@AntonNiklasson
Copy link
Copy Markdown
Owner

Summary

  • The GitHub GraphQL mutation for disabling auto-merge is disablePullRequestAutoMerge, not disableAutoMerge. Toggling auto-merge off errored with Field 'disableAutoMerge' doesn't exist on type 'Mutation'.
  • Fix the mutation name and update the existing test assertion.

Test plan

  • pnpm test passes
  • Toggle auto-merge off on a real PR in the UI

GitHub GraphQL mutation is `disablePullRequestAutoMerge`, not
`disableAutoMerge`. The wrong name caused the toggle to error out
when turning auto-merge off.
@AntonNiklasson AntonNiklasson marked this pull request as ready for review May 13, 2026 09:31
Copilot AI review requested due to automatic review settings May 13, 2026 09:31
@AntonNiklasson AntonNiklasson merged commit a5ffc08 into main May 13, 2026
1 check passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the GitHub GraphQL mutation used by the server route that toggles auto-merge off, aligning it with GitHub’s actual schema (disablePullRequestAutoMerge) so disabling auto-merge no longer fails at runtime.

Changes:

  • Update the auto-merge toggle route to call disablePullRequestAutoMerge instead of the nonexistent disableAutoMerge.
  • Adjust the existing route test to assert against the corrected mutation name.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/server/src/routes.ts Uses the correct GitHub GraphQL mutation for disabling auto-merge when a PR currently has auto-merge enabled.
packages/server/src/routes.test.ts Updates the unit test assertion to match the corrected mutation name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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