|
Version Control Integrations > Git Integration > Git Server Hooks |
|
|
ccollab admin trigger ensure-reviewed (for Git) |
|
Use the ensure-reviewed trigger to ensure that the review that was created for the specified changelist has been completed by the time you submit the changelist to the Git repository. If the review has not been completed, the trigger blocks the submit operation and displays an error message informing the user about the problem. Command Line Syntax: ccollab [global-options] admin trigger ensure-reviewed [--review-id-regex <value>] <changelist-id>
Installation To install this trigger you will typically create an update hook. If you already have an update hook, you can add our tool wherever it is appropriate; otherwise you will need to create an executable hook as described in the Git documentation. The update hook should iterate over the commits being pushed and call this trigger for each one of them, and then exit with a non-zero exit code if any of the trigger invocations failed. Example shell script: #!/bin/sh refname="$1" oldrev="$2" newrev="$3" for commit in `git rev-list $oldrev..$newrev -- ''` do /collab/install/ccollab --url <collabUrl> --user <collabUser> --password <collabPasswd> --scm git admin trigger ensure-reviewed $commit exitcode=$(($exitcode + $?)) done exit $exitcode Note our use of "exit" to ensure that the hook script terminates with a non-zero exit code if our trigger rejects one of the commits. |
|
© 2003-2025 SmartBear Software. All rights reserved. |