-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 support for multiple notification endpoints to existing webhook s… #108
Conversation
Re-ran the Travis build and seems to have passed checks. Must have been a transient error |
@ryan-codingintrigue Could you help me to fix the conflicts? I think I screwed up your PR fixing another bug. |
# Conflicts: # lib/notify.js
Thanks @juanpicado - I think that should be correct now. Apologies, I've never re-based a fork on Github before so this is quite new to me! |
lib/notify.js
Outdated
if (config.notify && config.notify.content) { | ||
var handleNotify = function(metadata, notifyEntry) { | ||
var regex | ||
if(metadata.name && notifyEntry.packagePattern) { |
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.
Could you standardize code styling? eg: if (
instead if(
. The same below for for
below. In part is my fault because eslint
strict styling hasn't been worked out yet.
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.
@juanpicado Thanks a lot, sorry for the delay on this. Migrated these changes to ES6 syntax and fixed those code styling issues.
# Conflicts: # lib/notify.js
thanks @ryan-codingintrigue 👍 again, I'll merge it today. |
I was doing unit testing for it and I noticed in Node without full ES6 support fails if you use packagePatternFlags. So I'll remove support for packagePatternFlags until Node 4 is dropped. TypeError: Cannot supply flags when constructing one RegExp from another
at new RegExp (native) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
@ryan-codingintrigue node 4 was dropped long time ago, https://github.com/verdaccio/verdaccio/blob/master/src/lib/notify.js#L9 |
This extends the existing webhook system to allow for posting to multiple endpoints based off the package name being published.
The current global webhook system remains untouched to allow for backwards compatibility - it will still run alongside any webhooks defined in a collection under the
notify
node.It also adds regular expression support to the existing global webhook.