Log in to v4
Example

Prevent specific users from committing

It's possible to use PullApprove to prevent certain users from being committers on GitHub pull requests. You can use this to achieve a separation of roles (ex. "mergers" aren't allowed to commit).

To do this, in the GitHub branch protection settings you can require pull requests, and require PullApprove as a status check:

GitHub required status check for PullApprove

Then in your review phases, you can write a requirement to prevent specific people from being committers:

Pull request compliance check on restricted committers

Prevent a specific user from committing

"merger-username" not in pull.committers

Prevent an entire GitHub team from committing

len(set(pull.committers).intersection(pull.organization.teams["team-name"].members)) == 0