Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eirc/git-hipchat-hook
A simple GIT post-receive hook script for notifying a room in HipChat.
https://github.com/eirc/git-hipchat-hook
Last synced: about 2 months ago
JSON representation
A simple GIT post-receive hook script for notifying a room in HipChat.
- Host: GitHub
- URL: https://github.com/eirc/git-hipchat-hook
- Owner: eirc
- Created: 2011-11-14T20:24:43.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2015-07-09T17:32:33.000Z (over 9 years ago)
- Last Synced: 2023-03-12T08:37:19.927Z (almost 2 years ago)
- Language: Shell
- Homepage:
- Size: 149 KB
- Stars: 43
- Watchers: 6
- Forks: 22
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git HipChat Hook
A simple GIT `post-receive` hook script for notifying a room in HipChat.
## Installation
Clone this repository somewhere in your GIT repository host server.
For example:```sh
cd /home/git
git clone git://github.com/eirc/git-hipchat-hook.git
```Clone [hipchat-cli](https://github.com/hipchat/hipchat-cli) somewhere in your GIT repository host server.
```sh
git clone git://github.com/hipchat/hipchat-cli.git
```Go to the `hooks` directory in a bare repository you want to setup the hooks for and add a `post-receive` script like this one and make sure its executable.
You can lookup the HipChat room id from the [rooms/list](https://www.hipchat.com/docs/api/method/rooms/list) API or use the HipChat room name (remember to urlencode it)
```sh
#!/bin/shHIPCHAT_SCRIPT="/path/to/hipchat_room_message"
HIPCHAT_ROOM="HipChat room name or room_id"
HIPCHAT_TOKEN="1234567890"
HIPCHAT_FROM="GIT". /path/to/hipchat-post-receive
```
If using gitorious make sure to add GIT_PROJECT="Name of project" to the hook:
```sh
#!/bin/shHIPCHAT_SCRIPT="/path/to/hipchat_room_message"
HIPCHAT_ROOM="HipChat room name or room_id"
HIPCHAT_TOKEN="1234567890"
HIPCHAT_FROM="GIT"
GIT_PROJECT="MyScripts". /path/to/hipchat-post-receive
```And you're done!
For GitWeb, CGit, Gitorious and Redmine integrations (optional) add the following configuration to the `post-receive` hook before the `hipchat-post-receive` source line.
Note that CGit and GitWeb, and Redmine and JIRA, are mutually exclusive.
```sh
CGIT="git.example.com/cgit"
GITWEB="gitweb.example.com"
JIRA="jira.example.com"
REDMINE="redmine.example.com"
GITORIOUS="gitorious.example.com"
```## Contributions
* [graffic](http://github.com/graffic) for the sed RegEx to link to Redmine issues.
* [jparise](http://github.com/jparise) for CGit and JIRA integrations.