At some point the API on the @octokit/webhooks library changed and it started requiring a full raw payload of the JSON data rather than a parsed body. To get around this, we store the raw string value of the body on the request object after verifying that the fields are valid.
Ideally we'd validate in the verification function, but alas the GitHub function is async and the verifier expects a synchronous throw.
At some point the API on the @octokit/webhooks library changed and it started requiring a full raw payload of the JSON data rather than a parsed body. To get around this, we store the raw string value of the body on the request object after verifying that the fields are valid.
Ideally we'd validate in the verification function, but alas the GitHub function is async and the verifier expects a synchronous throw.