mergeable
mergeable copied to clipboard
How to disable merge button when checks failed
Hi, I created a config file with must_exclude labels and when i created a pull request it showed that checks have failed which is fine as that's what I wanted.
but I was still able to merge the code. Is there a way to disable this button "merge pull request" until all the checks are passed.
regards, Nipun David
In branch protection of your repo, you need to add Mergeable to the list for required status checks:

In branch protection of your repo, you need to add Mergeable to the list for required status checks:
hey @jusx thanks...for a quick response...
one followup..what should be the branch name pattern...

I can see a few suggestions on stack overflow though...but I want all the pull requests to follow this rule...
@nipundavidnagarro The branch name pattern depends on your repository and workflow. By default Github will use main as the default branch and if all your PRs are created to merge into main -- then you'd use that as the name pattern.