8

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.

Spencer Goff
  • 1,036
  • 3
  • 14
  • 23

1 Answers1

5

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.

Spencer Goff
  • 1,036
  • 3
  • 14
  • 23
  • 7
    I have protected the branch, I add some checkbox as well, but the button is still not visible for me. Any idea , – etrimaille Mar 23 '22 at 13:32
  • 2
    I thought I had protection enabled as necessary for auto-merge, but it turns out I had to choose (in the repo Settings) which status checks had to pass in order for the PR to be mergable. Once I did that, the Auto-merge button showed up. – Tyson Phalp Jul 22 '22 at 05:11