Repository Setup
Pre-requirements
Commit-Hub hook scripts requires:
- Python > 2.4 installed and its executable available in /usr/bin/python
- GIT client installed and its executable available in PATH
- Network connection between machnine where hook is executed (client machine or server) and JIRA instance with Commit-Hub installed
Download hook script
In order to download pre-configured hook script for GIT repository please go to JIRA Administration and then:
- Navigate to Add-ons Section
- Navigate to Rulesets in Commit Hub section:
- No please select which ruleset should be configure and click on his Hook Setup button:
- After popup will apear please click on Download Git button
Installing hook script
After downloading the preconfigured hook script please unzip it and place in: GIT_REPOSITORY_PATH/.git/hooks/ where GIT_REPOSITORY_PATH is directory where you have cloned repository.
Configure hook script
The hook script is automaticly configured to your JIRA instance and ruleset before downloading it from Commit-Hub but in some cases there is a need of additional configuration:
- Paths to GIT or python are different than default
- Configurated address of JIRA instance is different than address that hook script should access ruleset
Test integration
After successfull copying of the hook script you can now configure your ruleset and commit changes to GIT repository to see if you get acceptance and rejection of the commits.