github / platform-samples

A public place for all platform sample projects.
Creative Commons Zero v1.0 Universal
1.92k stars 1.75k forks source link

Create example hook to reject web UI blob edits to a specific branch #583

Closed djdefi closed 1 year ago

djdefi commented 1 year ago

Similar / opposite idea as https://github.com/github/platform-samples/blob/master/pre-receive-hooks/restrict-master-to-gui-merges.sh

This prevents edits via the web UI file editor from saving an edit to a specified branch:

Screenshot 2023-03-17 at 10 00 51 AM