Many customers have expressed to us the requirement to perform certain actions PRIOR to developers checking-in their code. For example:
- Validate commit messages for certain commit messages, for example a valid Trac or other Ticket System ID
- Validate that any files added follow a specific file naming convention
Base on these validation, we can setup rules to reject these commits.
This is now possible with CloudForge Pre-commit Web Hook. Let me walk through how it works:
- Admin > Global Settings -> SVN -> Commit Hooks
- Enter your script URL, for example: https://yourserver.com/pre_commit_hook
- Select Timeout
- Select Default Action
- A User performs a commit to the SVN repository
- CloudForge sends commit information to your URL using an HTTP POST.
- Your URL can then perform any rules validation or script, with a JSON response of either allow or deny with a reason
- The commit will either be allowed or denied based on your custom pre-commit script
Here is an explanation of the different options:
- Script URL: This is the HTTP(s) URL that you want to send the commit informaiton to
- Timeout: this determines how long we wait for a response from your HTTP script
- Default Action: if we did not get a response from your script, in other words, it timed out, then the default action determines whether to Allow or Deny commit
0 Comments