feat(better-stack): add find incident action
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
import defineAction from '../../../../helpers/define-action.js';
|
||||||
|
|
||||||
|
export default defineAction({
|
||||||
|
name: 'Find incident',
|
||||||
|
key: 'findIncident',
|
||||||
|
description: 'finds an incident.',
|
||||||
|
arguments: [
|
||||||
|
{
|
||||||
|
label: 'Incident ID',
|
||||||
|
key: 'incidentId',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
variables: true,
|
||||||
|
description: 'ID for querying incidents.',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
async run($) {
|
||||||
|
const incidentId = $.step.parameters.incidentId;
|
||||||
|
|
||||||
|
const response = await $.http.get(`/v2/incidents/${incidentId}`);
|
||||||
|
|
||||||
|
$.setActionItem({ raw: response.data.data });
|
||||||
|
},
|
||||||
|
});
|
@@ -1,5 +1,11 @@
|
|||||||
import acknowledgeIncident from './acknowledge-incident/index.js';
|
import acknowledgeIncident from './acknowledge-incident/index.js';
|
||||||
import createIncident from './create-incident/index.js';
|
import createIncident from './create-incident/index.js';
|
||||||
|
import findIncident from './find-incident/index.js';
|
||||||
import resolveIncident from './resolve-incident/index.js';
|
import resolveIncident from './resolve-incident/index.js';
|
||||||
|
|
||||||
export default [acknowledgeIncident, createIncident, resolveIncident];
|
export default [
|
||||||
|
acknowledgeIncident,
|
||||||
|
createIncident,
|
||||||
|
findIncident,
|
||||||
|
resolveIncident,
|
||||||
|
];
|
||||||
|
@@ -5,6 +5,8 @@ items:
|
|||||||
desc: Acknowledges an incident.
|
desc: Acknowledges an incident.
|
||||||
- name: Create incident
|
- name: Create incident
|
||||||
desc: Creates an incident that informs the team.
|
desc: Creates an incident that informs the team.
|
||||||
|
- name: Find incident
|
||||||
|
desc: Finds an incident.
|
||||||
- name: Resolve incident
|
- name: Resolve incident
|
||||||
desc: Resolves an incident.
|
desc: Resolves an incident.
|
||||||
---
|
---
|
||||||
|
Reference in New Issue
Block a user