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](../img/CleanShot 2022-11-14 at 15.00.02.png)

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

![Pull request compliance check on restricted committers](../img/CleanShot 2022-11-14 at 15.01.32.png)

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