How to apply update hook on server side of repo on github #23467
-
I want to discard any push which is not following particular rules. I have deployed update hook on local git repo and tested but not sure how to do the same on github repo. Can someone guide? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It is not possible to have custom update hooks on GitHub. What people tend to do instead is to require CI checks to pass for all branches before they get merged into master, and those CI checks check all the rules. |
Beta Was this translation helpful? Give feedback.
-
Well this doesn’t help me enforce policy on pushes to feature branches. Is there some workaround |
Beta Was this translation helpful? Give feedback.
-
I also would like to know how to do this, specifically for the purpose of preventing sensitive information (like key files) from being added to the repository. |
Beta Was this translation helpful? Give feedback.
It is not possible to have custom update hooks on GitHub. What people tend to do instead is to require CI checks to pass for all branches before they get merged into master, and those CI checks check all the rules.