-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Only sets req.raw.body if body defined, aligning behaviour with node:http #201
Conversation
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.
lgtm
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.
Can you also skip Mac on v14 and v16?
7fe79ed
to
1cdeca2
Compare
Thanks for the review @mcollina, I've made the v8 change. Regarding skipping Mac on v14 and v16, do I just need to upgrade the fastify workflow version? Comparing the difference between previous CI jobs I'm assuming that's why it was skipped in this PR[0] |
.github/workflows/ci.yml
Outdated
@@ -17,7 +17,7 @@ on: | |||
|
|||
jobs: | |||
test: | |||
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v3 | |||
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v4.1.0 |
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.
Please revert this.
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v4.1.0 | |
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v3 |
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 Aras, that's now been reverted. This allowed the previous CI run to pass without running on Mac v14 and v16, I'm expecting it will fail again as CI will run again on Mac for these versions.
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.
It's wild out of anyone to review this to be you @Uzlopak, this relates to a change you made in the @octokit/webhooks
library, in the issue I linked above[0] that I've also created an issue and PR there for.
5c1df04
to
53811a7
Compare
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.
lgtm
I suppose this is a bug fix and does not require a major bump?
Thanks @gurgunday, yes I would assume it would just be a minor bump. |
53811a7
to
4ccea86
Compare
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.
lgtm
I've just tightened the conditional from |
Is there anything else required to get this merged? From my understanding CI will fail unless I include the next branch CI config (Fastify workflow v4.1.0), if we don't want to include that change within this PR and require CI to pass I could base this PR to the next branch instead? |
It should be good now, sorry for the intervention, had to trigger the ci |
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.
lgtm
Excellent! Thank you @gurgunday. I'm ready for it to be merged from my side. |
I'll release a new version |
Amazing! Thank you all for your assistance with this and your contributions to OSS |
Currently Middie's undefined req.body handling does not align with
node:http
andexpress
. Their behaviour, If the body has not been parsed with a body parser and is undefined, thebody
key will not be present within the request. Maddie includes thebody
key with an undefined value.I've created this PR as the library
@octokit/webhooks
does not currently work with Middie[0] because of this issue. I also feel it would be beneficial to align the behaviour where possible.Apologies, I haven't run the benchmark script, I don't see it available on main. Have I missed something?
[0] octokit/webhooks.js#1009
Checklist
npm run test
andnpm run benchmark
and the Code of conduct