-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add @octokit/webhooks #245
Add @octokit/webhooks #245
Conversation
@hross sorry at a glance i thought this was related to the change you made. it looks like this is about the github.context object instead |
@ericsciple these changes are in the same spirit as my changes (importing types instead of re-defining our own). I think they are good changes that we should add but I don't have a good way of testing them. @thboop has a similar issue on his plate. Maybe worth setting up something in canary that would test the toolkit with webhooks like we did for my changes. |
thank you very much :) appreciated |
Hey @srb2, thanks for the excellent PR! @hross, @ericsciple I'm going to merge this unless you have any reservations, I've tested the changes they seem good and its the correct step forward for the project. EDIT: we need one minor change before we can merge this. |
packages/github/src/interfaces.ts
Outdated
} | ||
repository?: Webhooks.PayloadRepository | ||
issue?: Webhooks.WebhookPayloadIssuesIssue | ||
pull_request?: Webhooks.WebhookPayloadPullRequest |
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 should be WebhookPayloadPullRequestPullRequest
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.
Thanks.
Done.
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.
There is type error
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.
Fix.
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.
One of the interfaces needs to be updated the best rest looks good to me!
Umm... |
@thboop |
@bryanmacfarlane thoughts? Do you know what the original motivation was, that these types were redefined rather than re-exported? The size concerns me. Installing There are thousands of lines of potential WebhookPayload* type definitions. I'm wondering about the original motivation of Assuming only a subset is desired (say for size consideration), at some point the solution is for the consumer to import Is the motivation for bumping to v3.0.0 because
|
I've added #310 which provides instructions on how to do this manually if needed. If there is a particularly field you think would be helpful to add, we can add that to the existing typescript definitions, feel free to open a PR or create an issue! Currently, this pr sets each field to its most common definition. For example, it sets If we are going to to import the
This would require bumping the major version of the module, and we don't want to push out a major version for just this at this time. I've tagged #147 with the enhancement flag and we will consider implementing it a future release. |
@thboop |
re #147