Search code examples
githubautomerge

GitHub auto-merge option isn't showing in pull requests


According to GitHub's docs, after enabling "Allow auto-merge" in my repo settings, I should see a button that says "Enable auto-merge" in my pull requests. I do not.

enter image description here

enter image description here

I've opened new PRs, toggled the types of merging allowed, and switched my repo visibility to public, but nothing has worked.


Solution

  • I resolved this by applying a branch protection to the main branch. Pull requests raised after that time now show the "Enable auto-merge" button.

    This makes sense because, if the base branch is unprotected, the PR would merge immediately after being raised since status checks typically take at least a couple of seconds to report a "pending" status.