-
``With the update to Probot 13 the typescript checking bring a lot more errors because types became of incompatible types. Does anybody know how to defines types correctly used from probot and the underlaying octokit? Here some example:
--> What is the best way to type for the conclusion value?
--> What is the best way to type for the complete input value? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
What types were you using before? The method of getting those types hasn't changed in Octokit import type { RestEndpointMethodTypes } from '@octokit/plugin-rest-endpoint-methods';
type ChecksUpdateParams = RestEndpointMethodTypes["checks"]["update"]["parameters"];
const input: ChecksUpdateParams = {
// Add parameters here
};
const conclusion: ChecksUpdateParams['conclusion'] = "success"; |
Beta Was this translation helpful? Give feedback.
-
Thanks that helped. To answer your question. I did not use an explicit type. I used the response data of the create check request to fill the input and it worked before. But it looks like with types update in the dependency chain it became invalid. May it does not come directly from probot changes but from probots dependency updates. |
Beta Was this translation helpful? Give feedback.
-
I am still interested in a migration guide, because there are some ugly changes like the webhook property change or an issue with signature check (I will open a new thread). |
Beta Was this translation helpful? Give feedback.
What types were you using before? The method of getting those types hasn't changed in Octokit