Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable merge button when checks failed #691

Open
nipundavidnagarro opened this issue Jan 24, 2023 · 3 comments
Open

How to disable merge button when checks failed #691

nipundavidnagarro opened this issue Jan 24, 2023 · 3 comments

Comments

@nipundavidnagarro
Copy link

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.

image

regards,
Nipun David

@jusx
Copy link
Member

jusx commented Jan 25, 2023

In branch protection of your repo, you need to add Mergeable to the list for required status checks:

image

@nipundavidnagarro
Copy link
Author

In branch protection of your repo, you need to add Mergeable to the list for required status checks:

image

hey @jusx thanks...for a quick response...

one followup..what should be the branch name pattern...

image

I can see a few suggestions on stack overflow though...but I want all the pull requests to follow this rule...

@jusx
Copy link
Member

jusx commented Jan 28, 2023

@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.

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

No branches or pull requests

2 participants