Skip to content

Instantly share code, notes, and snippets.

@rljohnsn
Forked from danriti/hipchat.sh
Created March 14, 2014 17:27
Show Gist options
  • Save rljohnsn/9552581 to your computer and use it in GitHub Desktop.
Save rljohnsn/9552581 to your computer and use it in GitHub Desktop.
# Build Passes
curl -d "room_id=ourRoom&from=BuildBot&message=Build+Status:+Passing&color=green" https://api.hipchat.com/v1/rooms/message?auth_token=AUTH_TOKEN_HERE&format=json
# Build Fails
curl -d "room_id=ourRoom&from=BuildBot&message=Build+Status:+Failing&color=red&notify=1" https://api.hipchat.com/v1/rooms/message?auth_token=AUTH_TOKEN_HERE&format=json
@rljohnsn
Copy link
Author

MESSAGE="Some crazy unescaped message with <a href=\"http://somewhere.com\">links</a> & stuff! Maybe even variables or commit messages: ${COMMIT_MESSAGE}"
CONFIG="room_id=FruitGuys&from=Jenkins&color=yellow"
curl -d $CONFIG --data-urlencode "message=${MESSAGE}" 'https://api.hipchat.com/v1/rooms/message?auth_token=yourtokengoeshere&format=json'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment