(key, body)
| 3 | |
| 4 | // validate your payload from GitHub |
| 5 | function signRequestBody(key, body) { |
| 6 | return `sha1=${crypto.createHmac('sha1', key).update(body, 'utf-8').digest('hex')}`; |
| 7 | } |
| 8 | // webhook handler function |
| 9 | exports.gongHandler = async (event) => { |
| 10 | // get the GitHub secret from the environment variables |