Skip to content

Fix Dependabot auto-merge without repository auto-merge setting#156

Merged
kapersoft merged 1 commit into
mainfrom
cursor/fix-dependabot-auto-merge-0562
Jun 23, 2026
Merged

Fix Dependabot auto-merge without repository auto-merge setting#156
kapersoft merged 1 commit into
mainfrom
cursor/fix-dependabot-auto-merge-0562

Conversation

@kapersoft

Copy link
Copy Markdown
Owner

Summary

Dependabot PRs (#153, #154) were stuck because the dependabot-auto-merge workflow failed with:

GraphQL: Auto merge is not allowed for this repository (enablePullRequestAutoMerge)

Additionally, main requires linear history, so merge commits (gh pr merge --merge) are rejected even when requirements are met.

Changes

  • Approve patch/minor Dependabot PRs on pull_request_target (required by branch rules: 1 approval + last-push approval).
  • Squash merge after CI completes via workflow_run, once mergeStateStatus is CLEAN and the PR is approved.
  • Stop using gh pr merge --auto --merge, which depends on the repository-level "Allow auto-merge" setting (allow_auto_merge is currently false).

After merge

Re-run the dependabot-auto-merge workflow on open Dependabot PRs (#153, #154), or comment @dependabot rebase to re-trigger checks and approval.

Repository setting (optional)

Enabling Settings → General → Pull Requests → Allow auto-merge would allow a simpler --auto workflow in the future, but is not required with this fix.

Open in Web Open in Cursor 

The workflow failed because the repository has allow_auto_merge disabled and
main requires linear history, so gh pr merge --auto --merge could never succeed.

Approve patch and minor Dependabot PRs on pull_request_target, then squash
merge them after CI completes via workflow_run once branch rules are satisfied.

Co-authored-by: Jan Willem Kaper <kapersoft@users.noreply.github.com>
@kapersoft kapersoft marked this pull request as ready for review June 23, 2026 05:31
@kapersoft kapersoft merged commit 33dfc35 into main Jun 23, 2026
11 checks passed
@kapersoft kapersoft deleted the cursor/fix-dependabot-auto-merge-0562 branch June 23, 2026 05:32
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