Example Job that has an unconfigured Integration (for testing)
This commit is contained in:
@@ -12,6 +12,7 @@ const db = {
|
||||
};
|
||||
|
||||
export const slack = new Slack({ id: "slack-6" });
|
||||
export const slackMissing = new Slack({ id: "slack-7" });
|
||||
|
||||
new Job(client, {
|
||||
id: "slack-kpi-summary",
|
||||
@@ -69,3 +70,23 @@ new Job(client, {
|
||||
return response;
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "slack-missing-integration",
|
||||
name: "Slack with missing integration",
|
||||
version: "0.1.1",
|
||||
integrations: {
|
||||
slack: slackMissing,
|
||||
},
|
||||
trigger: eventTrigger({
|
||||
name: "missing.integration",
|
||||
}),
|
||||
run: async (payload, io, ctx) => {
|
||||
const response = await io.slack.postMessage("message", {
|
||||
text: `There's no Slack connection, or is there?`,
|
||||
channel: "C04GWUTDC3W",
|
||||
});
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user