Is there a way to enable the branch protection for "Require status checks to pass before merging" only for PRs? At the moment when you enable this option is blocks people from making direct pushes to the branch. We would like to force checks to pass on PRs but still allow anyone to be able to push directly to the branch if they want. When we enable this option today, it forces everyone to open PRs even for trivial changes (like doc updates and typo fixes). We want to allow direct pushes, but prevent PRs from being merged unless it passes our CI tests.
Is there any way to achieve this workflow with GitHub today?
Hey! Check ou this guide here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks which should walk you through how to set this up.
@logankilpatrick Thanks for the response. Unfortunately those are the exact steps I tried and it does not resolve my question. When you configure status checks via the guide it forces users to go through PRs for all branch pushes in order to run checks. I don't want this. I want PR check to only apply to PRs and still allow unchecked direct commits/pushes to my branch.