Reputation: 12910
I am using a commitlint Github action to verify our commit messages. Just wanted to check if there is a way I can make it mandatory to pass before merging pull request.
current behaviour: commitlint github action fails, however, I can still merge the pull reqest
desired behaviour if commitlint github action fails, button to merge pull request should be disabled. (i.e. like reviewer restriction)
Upvotes: 25
Views: 28742
Reputation: 2509
You can add rules to your branches and how your merge request works.
Your repo -> Settings -> branches -> Branch protection rules -> Add rule
There, you will find something called Require status checks to pass before merging
. Under this, you should see Status checks found in the last week for this repository
. If you find the status you want to be passed before merging, you can enable the same.
Upvotes: 38