-
Notifications
You must be signed in to change notification settings - Fork 10
Setup Config Repo Pre receive Hook
Information
- Pre-receive hooks are fully documented at https://help.github.com/enterprise/2.8/admin/guides/developer-workflow/about-pre-receive-hooks/
The Spring Cloud Config Validator
project exposes its script as a Pre-receive hook in Github Enterprise, which is fully compatible with the Github Host. The Validator script will validate configuration changes in the following scenarios:
Scenario | Expected Behavior |
---|---|
Validate Localgit push
|
When the user executes git push origin REPO and the origin is a valid Github Enterprise URL. |
Validate Online commits | When updating any Config Server configuration file through the Github Enterprise UI. |
Validate Pull Requests | When pressing the button Merge Pull Request when accepting a Pull Request. |
Enabling or disabling the hook is enabled.
Note You can enable the pre-receive hook any time in your repository. That won't cause any repo access disruption.
Go to Settings -> Hooks and services -> Pre-receive hooks section and enable the Spring Cloud Config Validator
. Then, make sure it is Enabled instead of Disabled as shown below. You will see a green bullet prefixing the name.
Note You can disable the pre-receive hook at any moment and it won't cause any repository disruption.
Opposite to the previous section, you must make sure it is Disabled as shown in the other hooks in the previous example. You will see a gray bullet prefixing the name.