-
Notifications
You must be signed in to change notification settings - Fork 81
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
fix(typescript): revert #459 & #464 #494
Conversation
c4fc4e4
to
b46303a
Compare
This reverts commit aad9b74.
b46303a
to
9e002f8
Compare
This fixes the problem. What about the scenario brought up in #464? Since we only allow to append to the event and not change it completely. |
I would like to add a test in
I would create an issue (I think there was not one before) so we keep discussing this. What do you think? |
That should be as easy, just add an event handler for a certain event (ex:
Yes, we should create an issue. |
We have this already, and seems it did not prevent us to break types: webhooks.js/test/typescript-validate.ts Lines 164 to 166 in 01c7655
This is the test example you were suggesting right? |
That doesn't have the webhooks.js/test/typescript-validate.ts Lines 179 to 182 in 01c7655
|
Ok, but with changes introduced by this PR it passes the |
After a second look, I can say that that should do the trick for the purposes of this PR |
Added a comment linking to this PR for that line to give context for other developers before modifying it in the future |
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.
Added a comment linking to this PR for that line to give context for other developers before modifying it in the future
Per my comment here, at some point we should modify the runtime code to prevent this as much as possible.
Closes octokit/app.js#213 |
📝 Summary
Reverts the following PR's:
⛱ Motivation and Context
Types for webhooks are broken when a
transform
function is passed in the options:octokit/app.js#213 (comment)
Follow up conversation:
#492 (comment)