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

Function buildAttachments

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

Source from the content-addressed store, hash-verified

17const eventbridge = new EventBridgeClient({ apiVersion: '2015-10-07' });
18
19async function buildAttachments(event) {
20 const blocks = await statusBlocks(event);
21
22 return [
23 {
24 color: statusColor(event),
25 // TODO fallback: '',
26 blocks,
27 },
28 ];
29}
30
31export const handler = async (event) => {
32 console.log(JSON.stringify(event));

Callers 1

handlerFunction · 0.85

Calls 2

statusBlocksFunction · 0.90
statusColorFunction · 0.90

Tested by

no test coverage detected