Skip to content

Instantly share code, notes, and snippets.

@hSATAC
hSATAC / hockeyapp-hipchat-relay.php
Created October 29, 2013 09:32
HockeyApp & HipChat Intergration
<?php
$token = $_GET['auth_token'];
$info = json_decode($HTTP_RAW_POST_DATA, true);
$app_version = $info['app_version'];
$message = urlencode("A new build of <a href='$info[url]'>$app_version[title] #$app_version[version]</a> is just released.");
$room_id = 'xxx';
$endpoint = "https://api.hipchat.com/v1/rooms/message?auth_token=$token&room_id=$room_id&from=HockeyApp&message_format=html&notify=1&color=purple&message=$message";
file_get_contents($endpoint);