awdk
(Andrzej)
June 19, 2026, 10:37am
1
Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
A GitHub PR in the repository I’m currently working is not “auto-mergeable”. The error says the following:
Pull request action failed: Failed to enable
auto-merge: Auto merge is not allowed for
this repository
In reality, the auto-merges are enabled in the repository, however the repository has Merge Queues enabled. So after all the checks are done, I expect not a “merge” but “enqueueing” the PR to the MQ, that seems to be the problem.
Steps to Reproduce
GitHub repo must have a Merge Queue feature enabled
Click on the Enable Auto-Merge button
Expected Behavior
The PR is scheduled to automatically add itself to the merge queue when all checks are passed
Screenshots / Screen Recordings
Operating System
MacOS
Version Information
Version: 3.8.11
VS Code Extension API: 1.105.1
Commit: e56ad3440df06d22ca7501e65fd518e905486ef0
Date: 2026-06-18T01:40:18.333Z
Layout: glass
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 24.6.0
Additional Information
I have found a similar bug is already reported to the gh CLI issue tracker, so depending on how this is implemented in Cursor, we either need to fix it here, or wait for the upstream solution.
otwarty 06:41AM - 12 May 26 UTC
bug
priority-3
gh-pr
### Describe the bug
`gh pr merge` fails with `GraphQL: Auto merge is not allow… ed for this repository (enablePullRequestAutoMerge)` when merge queue is enabled (via repo-level ruleset) but `allow_auto_merge` is disabled on the repository.
The CLI correctly detects the merge queue (`isMergeQueueEnabled = true`) and sets `payload.auto = true` in [`merge.go`](https://github.com/cli/cli/blob/trunk/pkg/cmd/pr/merge/merge.go) (via `shouldAddToMergeQueue()`), but then [`http.go`](https://github.com/cli/cli/blob/trunk/pkg/cmd/pr/merge/http.go) routes `payload.auto = true` to the `enablePullRequestAutoMerge` mutation -- which requires auto-merge to be enabled on the repo. It seems like the code could fall back to `enqueuePullRequest` when auto-merge is disabled.
Related: #8352 (similar symptoms but originally reported for PATs with missing fields; this variant is specifically about `allow_auto_merge = false` + merge queue via ruleset).
### Affected version
```
gh version 2.92.0 (2026-04-28)
```
### Steps to reproduce the behavior
1. Create a repository with `allow_auto_merge = false`
2. Enable merge queue via a repo-level ruleset (not the legacy branch protection setting)
3. Open a PR that passes all required checks
4. Run `gh pr merge <PR_NUMBER> --merge`
### Expected vs actual behavior
**Expected:** PR is enqueued into the merge queue via `enqueuePullRequest` mutation.
**Actual:** CLI sends `enablePullRequestAutoMerge` mutation, which fails:
```
GraphQL: Auto merge is not allowed for this repository (enablePullRequestAutoMerge)
```
### Logs
```
$ gh pr merge <PR_NUMBER> --merge
GraphQL: Auto merge is not allowed for this repository (enablePullRequestAutoMerge)
```
**Workaround** (direct GraphQL):
```bash
gh api graphql -f query='
mutation($prId: ID!) {
enqueuePullRequest(input: {pullRequestId: $prId}) {
mergeQueueEntry { id position }
}
}' -f prId="$(gh pr view <PR_NUMBER> --json id --jq .id)"
```
Verified working -- PR enqueued and merged successfully through the queue.
Does this stop you from using Cursor
No - Cursor works, but with this issue