MCPcopy Create free account
hub / github.com/Devographics/Monorepo / checkMainPushAction

Function checkMainPushAction

api/src/external_apis/github.ts:105–113  ·  view source on GitHub ↗
(req: Request, res: Response, next: NextFunction)

Source from the content-addressed store, hash-verified

103}
104
105export async function checkMainPushAction(req: Request, res: Response, next: NextFunction) {
106 // @see https://docs.github.com/en/webhooks/webhook-events-and-payloads#push
107 const action = req.headers?.['x-github-event']
108 const { ref /*, repository, sender */ } = req.body
109 if (!(action === 'push' && ref === 'refs/heads/main')) {
110 return res.status(200).send(`Nothing to do for action ${action} on ref ${ref}`)
111 }
112 next()
113}

Callers

nothing calls this directly

Calls 1

nextFunction · 0.85

Tested by

no test coverage detected