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

Function handler

ci/src/build-handler/index.mjs:354–370  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

352 * @returns {Promise<void>}
353 */
354export const handler = async (event) => {
355 console.log(JSON.stringify(event));
356
357 const githubEvent = event['detail-type'];
358 const githubEventObj = event.detail;
359
360 switch (githubEvent) {
361 case 'push':
362 await handlePushEvent(githubEventObj);
363 break;
364 case 'pull_request':
365 await handlePullRequestEvent(githubEventObj);
366 break;
367 default:
368 console.log('Ignoring this event type!');
369 }
370};

Callers

nothing calls this directly

Calls 2

handlePushEventFunction · 0.85
handlePullRequestEventFunction · 0.85

Tested by

no test coverage detected