Compare commits

...

1 Commits

Author SHA1 Message Date
Rıdvan Akca
77f84944c7 feat(better-stack): add acknowledge incident action 2024-01-16 12:37:41 +03:00
6 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
import defineAction from '../../../../helpers/define-action.js';
export default defineAction({
name: 'Acknowledge incident',
key: 'acknowledgeIncident',
description: 'Acknowledges an incident.',
arguments: [
{
label: 'Incident ID',
key: 'incidentId',
type: 'string',
required: true,
variables: true,
description:
'This serves as the incident ID that requires your acknowledgment.',
},
{
label: 'Acknowledged by',
key: 'acknowledgedBy',
type: 'string',
required: false,
variables: true,
description:
"This refers to the individual's name, email, or another form of identification that the person who acknowledged the incident has provided.",
},
],
async run($) {
const acknowledgedBy = $.step.parameters.acknowledgedBy;
const incidentId = $.step.parameters.incidentId;
const body = {
acknowledged_by: acknowledgedBy,
};
const response = await $.http.post(
`/v2/incidents/${incidentId}/acknowledge`,
body
);
$.setActionItem({ raw: response.data.data });
},
});

View File

@@ -0,0 +1,3 @@
import acknowledgeIncident from './acknowledge-incident/index.js';
export default [acknowledgeIncident];

View File

@@ -1,6 +1,7 @@
import defineApp from '../../helpers/define-app.js';
import addAuthHeader from './common/add-auth-header.js';
import auth from './auth/index.js';
import actions from './actions/index.js';
export default defineApp({
name: 'Better Stack',
@@ -13,4 +14,5 @@ export default defineApp({
primaryColor: '000000',
beforeRequest: [addAuthHeader],
auth,
actions,
});

View File

@@ -37,6 +37,7 @@ export default defineConfig({
collapsible: true,
collapsed: true,
items: [
{ text: 'Actions', link: '/apps/better-stack/actions' },
{ text: 'Connection', link: '/apps/better-stack/connection' },
],
},

View File

@@ -0,0 +1,12 @@
---
favicon: /favicons/better-stack.svg
items:
- name: Acknowledge incident
desc: Acknowledges an incident.
---
<script setup>
import CustomListing from '../../components/CustomListing.vue'
</script>
<CustomListing />

View File

@@ -2,6 +2,7 @@
The following integrations are currently supported by Automatisch.
- [Better Stack](/apps/better-stack/actions)
- [Carbone](/apps/carbone/actions)
- [DeepL](/apps/deepl/actions)
- [Delay](/apps/delay/actions)