Reputation: 113
I'm looking to add a custom guard to a Heroku application that blocks a push to my app's master
branch from any other branch except master
on a developer's local machine, but I don't see anything in the Heroku documentation for accessing the pre-receive hook. Does anyone know whether this is even possible to access, or if there's some other configuration or add-on that will offer me the same functionality?
Upvotes: 1
Views: 242
Reputation: 1324228
Since Heroku does use its own pre-receive hook (as illustrated here), and only mention a "deploy hook", you would need to either:
push to an intermediate repo that you control,n in order to put a pre-receive hook there: if that passes, that same hook can then push to the actual heroku remote repo. That is the gate repo strategy.
or use a pre-commit hook (which is less convenient, as it needs to be deployed in all developers repos)
Upvotes: 1