The protected branch UI says this under “Restrict who can push to this branch”:
Specify people or teams allowed to push to this branch. Required status checks will still prevent these people from merging if the checks fail.
But I can’t find anything that tells me *how* to run a status check when doing a push into a branch. Can someone explain how to do this? Situation:
- We have repos in which teams have write access so they can push directly to their own branches.
- Our policies require that they issue pull requests to merge changes from those branches into our master branch.
- We have status checks on the master branch that run when PRs are created to run validation and other checks.
- The status checks are currently not required but we want to make them required so that team members are forced to address issues that are found.
- We have a background process that needs to push directly into the master branch.
When we make status checks required, this prevents the background process from pushing changes into the master branch. This makes sense but the red text above makes me think there’s a way to trigger the status checks when trying to push into master, but I can’t find any info about how to do it. So I’m wondering:
- *How* do you get a status check to run on a commit or set of commits being pushed into a protected branch that has required checks?
- If “include administrators” isn’t enabled, can admins bypass status checks?
thanks for any help you can give.