Skip to content

Instantly share code, notes, and snippets.

@noob-master147
Created July 29, 2021 08:17
Show Gist options
  • Save noob-master147/d179d906ee34191e4346296b7b068e80 to your computer and use it in GitHub Desktop.
Save noob-master147/d179d906ee34191e4346296b7b068e80 to your computer and use it in GitHub Desktop.
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "0076D7",
"summary": "New incident " + `${incident.counterId}`,
"sections": [{
"activityTitle": this.getTitle(incident),
"activitySubtitle": "Spike.sh Alert",
"activityImage": "https://gblobscdn.gitbook.com/spaces%2F-Ln3jS1bJTTsE3yoEcOu%2Favatar.png?alt=media",
"facts": [
{
"name": "Incident",
"value": `[#${incident.counterId}](https://app.spike.sh/incidents/${incident.counterId})`
},
{
"name": "Integration",
"value": integration.customName ? integration.customName : integration.name
},
{
"name": "Escalation policy",
"value": escalation.name
},
{
"name": "Service affected",
"value": service.name
},
{
"name": "Links found in the incident",
"value": links
}
],
"markdown": true
}],
"potentialAction": [{
"@type": "ActionCard",
"name": "Action",
"actions": [{
"@type": "HttpPOST",
"name": "Acknowledge",
"target": "https://escalations.spike.sh/api/acknowledge-manually",
"body": body
}, {
"@type": "HttpPOST",
"name": "Resolve",
"target": "https://escalations.spike.sh/api/resolve-manually",
"body": body
}]
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment