Pre-Commit Web Hook for SVN

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:

  1. Admin > Global Settings -> SVN -> Commit Hooks
  2. Enter your script URL, for example:
  3. Select Timeout
  4. Select Default Action
  5. A User performs a commit to the SVN repository
  6. CloudForge sends commit information to your URL using an HTTP POST.
  7. Your URL can then perform any rules validation or script, with a JSON response of either allow or deny with a reason
  8. 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



Article is closed for comments.