Merge pull request #281 from schubter/feature/hipchat-server

added HIPCHAT_SERVER environment variable
pull/283/head
Karolis Rusenas 2018-10-02 12:39:09 +01:00 committed by GitHub
commit 974a9780e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,8 @@ import (
"os"
"strings"
"net/url"
"github.com/tbruyelle/hipchat-go/hipchat"
"github.com/keel-hq/keel/constants"
@ -47,6 +49,11 @@ func (s *sender) Configure(config *notification.Config) (bool, error) {
s.hipchatClient = hipchat.NewClient(token)
if os.Getenv("HIPCHAT_SERVER") != "" {
server, _ := url.Parse(os.Getenv("HIPCHAT_SERVER"))
s.hipchatClient.BaseURL = server
}
log.WithFields(log.Fields{
"name": "hipchat",
"channels": s.channels,