Skip to content

Commit

Permalink
fix(teams): make ChannelURL naming consistent (#2545)
Browse files Browse the repository at this point in the history
* chore: ignore /vendor directory

* fix(teams): rename channel_url to channel-url to match config
  • Loading branch information
sranka authored May 10, 2021
1 parent 1f2c956 commit ebee9bf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ kapacitor*.zip
/kapacitord
/tickfmt
/tickdoc

# Ignore go vendor directory
/vendor
2 changes: 1 addition & 1 deletion pipeline/alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -2248,7 +2248,7 @@ type TeamsHandler struct {

// Teams channel webhook URL to post messages.
// If empty uses the URL from the configuration.
ChannelURL string `json:"channel_url"`
ChannelURL string `json:"channel-url"`
}

// Send the alert to ServiceNow.
Expand Down
2 changes: 1 addition & 1 deletion server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9400,7 +9400,7 @@ func TestServer_ListServiceTests(t *testing.T) {
Link: client.Link{Relation: client.Self, Href: "/kapacitor/v1/service-tests/teams"},
Name: "teams",
Options: client.ServiceTestOptions{
"channel_url": "",
"channel-url": "",
"alert_topic": "test kapacitor alert topic",
"alert_id": "foo/bar/bat",
"message": "test teams message",
Expand Down
2 changes: 1 addition & 1 deletion services/teams/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (s *Service) StateChangesOnly() bool {
}

type testOptions struct {
ChannelURL string `json:"channel_url"`
ChannelURL string `json:"channel-url"`
AlertTopic string `json:"alert_topic"`
AlertID string `json:"alert_id"`
Message string `json:"message"`
Expand Down

0 comments on commit ebee9bf

Please sign in to comment.