diff --git a/hooks/spike/README.md b/hooks/spike/README.md new file mode 100644 index 0000000..c8e5fd2 --- /dev/null +++ b/hooks/spike/README.md @@ -0,0 +1,8 @@ +### Spike + +Sends 'Trigger events' to Spike. + +- On Spike's dashboard, add a new Errorception integration +- Copy the integration's webhook URL to use it on our dashboard + +Here are few Simple steps to get your Integration URL in [Spike](https://docs.spike.sh/integrations-guideline/create-integration-and-service-on-dashboard). diff --git a/hooks/spike/index.js b/hooks/spike/index.js new file mode 100644 index 0000000..280a24f --- /dev/null +++ b/hooks/spike/index.js @@ -0,0 +1,27 @@ +var request = require("request"), + path = require("path"); + +exports.serviceName = "Spike"; + +exports.author = { + name: "Kaushik Thirthappa", + email: "kaushik@spike.sh", + github: "ktkaushik", + twitter: "ktkaushik" +}; + +exports.onError = function(error, settings, done) { + + request({ + url: settings.url, + headers: { + "Content-Type": "application/json", + "User-Agent": "Spike Notification" + }, + method: "post", + body: JSON.stringify({ + details: error + }), + timeout: 10000 + }, done); +}; \ No newline at end of file