-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: upgrade buildcop to probot 10 #1000
Conversation
…bots into upgrade-buildcop
…bots into upgrade-buildcop
@@ -75,6 +79,139 @@ const GROUPED_MESSAGE = `Many tests failed at the same time in this package. | |||
|
|||
`; | |||
|
|||
interface IssuesListForRepoResponseItem { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do we need to define this type? Seems like it should be a part of @octokit/types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let issues = await context.github.paginate(options); | ||
let issues = (await context.github.paginate( | ||
options | ||
)) as IssuesListForRepoResponseData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised we need this cast when we didn't before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because it's expecting a type of Promise<PaginationResults<unknown>>
rather than the array of data that it will be.
Octokit: require('@octokit/rest').Octokit, | ||
probot = createProbot({ | ||
githubToken: 'abc123', | ||
Octokit: TestingOctokit as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bunch of any
lint warnings in this file, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, unfortunately the 'any' is a known issue since the Github API event names have been locked down; see here: octokit/webhooks.js#277
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add this as a comment in the file, though!
@tbpg Thanks for the review! I cut down on the |
No description provided.