Skip to content

Instantly share code, notes, and snippets.

View rajeshshettysrs's full-sized avatar

SRSRNSSRS rajeshshettysrs

  • RSL
  • bangalore
View GitHub Profile
@Benjaminhu
Benjaminhu / sentry_google_chat_webhook.php
Last active November 14, 2022 14:25
This script can act as a middleman between Sentry's webhook system and Google Chat Incoming Webhooks
<?php
$googleChatWebhookURL = '<YOUR-GOOGLE-CHAT-WEBHOOK-URL>';
$integrationClientSecret = '<YOUR-Sentry-Settings-integration-Edit Integration-CREDENTIALS-Client Secret>';
/**
* https://developers.google.com/chat/how-tos/webhooks#step_2_write_the_webhook_script
* https://developers.google.com/chat/api/guides/message-formats/basic
*/
@dkmonaghan
dkmonaghan / sentry_mattermost_webhook.php
Created October 28, 2020 17:49
This script can act as a middleman between Sentry's webhook system and Mattermost's Incoming Webhooks
<?php
$json = json_decode(file_get_contents('php://input'), true);
if ($json['action'] !== 'created'){ die('Only create actions are alerted'); }
$error = $json['data']['issue'];
if ($error['project']['id'] == 1){ die('Ignore internal errors.'); }
if (empty($error['shortId'])){ die('No shortId passed'); }
// Set channel and username