How to restrict push to git repository if the commit is not accepted in Phabricator?

I want to restrict users to push directly to git repository without pre-commit to Phabricator. Please suggest solutions to avoid push without pre-commit. I don't know how to write git hook for this. Thanks in advance:)

Herald rules applied example

Herald rules not working. Arc land still pushes code.

Upvotes: 0

Views: 919

Answers (1)

OCram85
OCram85

Reputation: 889

You need to think about 2 things:

  • Avoid commits from direct pushes without Diffs. This would reject creating a post-push workflow called audit

Herald Rule Overview Herald Rule Details

NOTE: This solution still works, I'm running this config for 2 years now ;)

Upvotes: 1

Related Questions