Skip to content

Commit

Permalink
added HIPCHAT_SERVER environment variable
Browse files Browse the repository at this point in the history
to allow specifying a self hosted hipchat server
  • Loading branch information
schubter committed Oct 2, 2018
1 parent fbaa04e commit 3d98227
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions extension/notification/hipchat/hipchat.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"os"
"strings"

"net/url"

"github.com/tbruyelle/hipchat-go/hipchat"

"github.com/keel-hq/keel/constants"
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 3d98227

Please sign in to comment.