-
Notifications
You must be signed in to change notification settings - Fork 3
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(3225): handling when the webhook is incorrect [4] #37
fix(3225): handling when the webhook is incorrect [4] #37
Conversation
index.js
Outdated
|
||
err.statusCode = 400; | ||
|
||
throw err; |
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.
do we need to add a test?
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.
Thank you. I add a test for this.
🎉 This PR is included in version 8.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Context
The
parseHook
method returnsnull
when all scm instances do not accept the webhook.So we cannnot know whether the webhook has correct signature at here because
null
is returned too when the webhook type is not supported.Objective
Throw error when all
scm
instances do not accept the webhook.It will be able to see correctly that each
scm
accept the webhook or not by the following PRs.Webhook response example
References
Issue
License
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.