MCPcopy Create free account
hub / github.com/PRX/Infrastructure / handler

Function handler

ci/src/slack-message-handler/index.mjs:31–52  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

29}
30
31export const handler = async (event) => {
32 console.log(JSON.stringify(event));
33
34 const attachments = await buildAttachments(event);
35
36 await eventbridge.send(
37 new PutEventsCommand({
38 Entries: [
39 {
40 Source: 'org.prx.ci',
41 DetailType: 'Slack Message Relay Message Payload',
42 Detail: JSON.stringify({
43 channel: 'G5C36JDUY', // #ops-build
44 username: 'AWS CodeBuild',
45 icon_emoji: ':ops-codebuild:',
46 attachments,
47 }),
48 },
49 ],
50 }),
51 );
52};

Callers

nothing calls this directly

Calls 1

buildAttachmentsFunction · 0.85

Tested by

no test coverage detected