(body: any)
| 210 | // Parses the body of a request |
| 211 | // If it's a Buffer, it will be parsed as JSON |
| 212 | function parseBody(body: any) { |
| 213 | if (Buffer.isBuffer(body)) { |
| 214 | return safeJsonParse(body.toString()); |
| 215 | } |
| 216 | |
| 217 | if (typeof body === "string") { |
| 218 | return safeJsonParse(body); |
| 219 | } |
| 220 | |
| 221 | return body; |
| 222 | } |
| 223 | |
| 224 | async function webhookHandler(event: HandlerEvent<"HTTP">, logger: Logger) { |
| 225 | logger.debug("[inside github integration] Handling github repo event"); |
no test coverage detected
searching dependent graphs…