This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var csv = require("ya-csv"); | |
var moment = require("moment-timezone"); | |
// set up the csv reader | |
var reader = csv.createCsvStreamReader(process.openStdin(), {}); | |
// our data will be added to this list | |
var events = []; | |
// handle each row in the spreadsheet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ PagerDuty sends a specific webhook format, and we need to translate it into an API call to Dashing. | |
You can paste this lua script into http://webscript.io to do the translation easily. You might be able to use Zapier to | |
do the same thing. | |
]]-- | |
-- Get the incident ID, user, and trigger type from the PagerDuty webhook | |
local incidentid = json.parse(request.body).messages[1].data.incident.id | |
local user = json.parse(request.body).messages[1].data.incident.assigned_to_user.name | |
local desc = json.parse(request.body).messages[1].data.incident.trigger_summary_data.description |