-
Notifications
You must be signed in to change notification settings - Fork 31
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
Allow webhook to be configured globally #6
Conversation
@@ -2,33 +2,52 @@ | |||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x | |||
source "$(dirname $0)/../common/functions" | |||
|
|||
is_webhook() { | |||
echo "$1" | grep '^http' |
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.
Would this not also match if an app name begins with http
, for example httpserver
?
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.
Yep you’re right! I’m making a small adjustment :)
Just one small comment. The rest looks very good! |
The "app" part of the existing commands is now optional and allows the webhook to be enabled globally (for all apps). When a global webhook is enabled and a specific one for an app is also enabled, the notification will be send to the specific one.
Done! :) |
@matto1990 any update on this? :) |
Looks good. The only minor issue I've found is that if you have a global webhook set and query the webhook for a single app it should likely return the global URL as that will actually be used. I'm happy to merge this in as it is though! Thanks for the great work and really sorry about the long delay! |
Allow webhook to be configured globally
Ok great, thanks! |
The "app" part of the existing commands is now optional and allows the
webhook to be enabled globally (for all apps).
When a global webhook is enabled and a specific one for an app is also
enabled, the notification will be send to the specific one.