Cannot create an app that listens the webhook "pull_request_review_thread"

133 Views Asked by At

I am trying to create a simple app that will output the payload after the webhook "pull_request_review_thread" is triggered with any action. Here is the link to the related webhook: Pull_request_review_thread Github Docs

However, this code:

app.on("pull_request_review_thread", async(context) =>{ app.log.info(context.payload); })

gives the error:

Argument of type '"pull_request_review_thread"' is not assignable to parameter of type 'keyof EventTypesPayload | (keyof EventTypesPayload)[]'

Am I missing something?

1

There are 1 best solutions below

0
BerkayCalmaz On BEST ANSWER

The problem was not having the latest version of @octokit/webhooks-types. It can be checked with the command "npm ls @octokit/webhooks-types" , current latest version is 5.8.0