Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
post a message to a hipchat room
@echo off
set Count=0
for %%a in (%*) do set /a Count+=1
echo %Count%
if %count% NEQ 2 goto usage
c:
cd C:\Dovetail\RuleManagerActions\Hipchat
SET room=%1
SET message=%2
SET token=mySecretTokenGoesHere
SET json='{ "message": %message%, "message_format":"text" }'
:sendMessage
curl -k -H 'Content-Type: application/json' -d %json% https://api.hipchat.com/v2/room/%room%/notification?auth_token=%token%
goto done
:usage
echo.
echo Invalid usage
echo Usage: hipchat-message roomNameOrId message
echo.
:done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment