Skip to content
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

Merged
merged 1 commit into from
Apr 18, 2015

Conversation

Flink
Copy link
Contributor

@Flink Flink commented Apr 4, 2015

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.

@@ -2,33 +2,52 @@
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"

is_webhook() {
echo "$1" | grep '^http'
Copy link
Contributor

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?

Copy link
Contributor Author

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 :)

@matt-oakes
Copy link
Contributor

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.
@Flink
Copy link
Contributor Author

Flink commented Apr 6, 2015

Done! :)

@Flink
Copy link
Contributor Author

Flink commented Apr 15, 2015

@matto1990 any update on this? :)

@matt-oakes
Copy link
Contributor

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!

matt-oakes pushed a commit that referenced this pull request Apr 18, 2015
Allow webhook to be configured globally
@matt-oakes matt-oakes merged commit f890e03 into ribot:master Apr 18, 2015
@Flink Flink deleted the global-config branch April 19, 2015 23:12
@Flink
Copy link
Contributor Author

Flink commented Apr 19, 2015

Ok great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants