hankman2k / hipchat-svn-post-commit Goto Github PK
View Code? Open in Web Editor NEWUsing the SVN post-commit hook, sends information to your registered HipChat room (www.hipchat.com)
License: MIT License
Using the SVN post-commit hook, sends information to your registered HipChat room (www.hipchat.com)
License: MIT License
post-commit: Hook used for SVN post commits This script is set to publish information after SVN commits to HipChat. The script uses the hipchat-cli to do all the heavy lifting. This is required, unless you want to create/use a different hipchat-cli. Required files/Application/services: * hipchat_room_message: https://github.com/hipchat/hipchat-cli * Subversion: http://subversion.tigris.org/ * Working repository (you're on your own here) * HipChat account and room setup: https://www.hipchat.com/ * HipChat token created: https://www.hipchat.com/groups/api The use of "post-commit" as the name of the file is required and must be placed in the "/hooks" directory of your repository. Each repository will need it's own "post-commit" hook. For windows based SVN systems, add ".bat" to the file name. The hipchat-cli can be placed anywhere on the filesystem. The location can be set in the script file. The user MUST edit the script file to add in * hipchat token * hipcaht room number * location of hipchat-cli * a user name for display in hipchat * location of svnlook command. In RedHat/CentOS /usr/bin/svnlook * location of temp file. To test: 1) Edit script file 2) chmod 755 script file 3) # ./post-commit <svn repo> <rev #> where <svn repo> is your full path to the repository and <rev #> is any number. The REV number does not have to be accurate. 4) Look at your log in HipChat and verify that information was posted. 5) Finally, add/update a file in your checked out repository and commit. 6) Look at your log in HipChat and verify that information was poster. Note from author: If you like this script and get use out of it, give back! Yep. You too can give something back to the open source communities. If you can give code, give money to your favorite open source program. Keep open source alive.
Just wondering, although it's working in script, somehow it's not working if I append the version. I've put a diff what I've changed in the script.
./post-commit /repo/path <#commit-number>
I've change and put -r ${REV} in the post-commit file and now it's working.
*** post-commit.old 2011-05-18 21:25:51.000000000 +0800
--- post-commit 2011-05-18 21:26:36.000000000 +0800
*** 82,90 ****
REPO="$1"
REV="$2"
! CMT="${LOOK} log ${REPO}"
! WHO="${LOOK} author ${REPO}"
! FILES="${LOOK} changed ${REPO}"
HCCTL="${HCCLI} -t ${TOKEN} -r ${ROOM} -f ${USER}"
--- 82,90 ----
REPO="$1"
REV="$2"
! CMT="${LOOK} log ${REPO} -r ${REV}"
! WHO="${LOOK} author ${REPO} -r ${REV}"
! FILES="${LOOK} changed ${REPO} -r ${REV}"
HCCTL="${HCCLI} -t ${TOKEN} -r ${ROOM} -f ${USER}"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.