Skip to content

Commit 53cf295

Browse files
authored
fix(teams): revert ChannelURL mapping to preserve backward compatibility with saved TICKscripts (#2571)
1 parent 5bbdec6 commit 53cf295

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

pipeline/alert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2248,7 +2248,7 @@ type TeamsHandler struct {
22482248

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

22542254
// Send the alert to ServiceNow.

server/server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9457,7 +9457,7 @@ func TestServer_ListServiceTests(t *testing.T) {
94579457
Link: client.Link{Relation: client.Self, Href: "/kapacitor/v1/service-tests/teams"},
94589458
Name: "teams",
94599459
Options: client.ServiceTestOptions{
9460-
"channel-url": "",
9460+
"channel_url": "",
94619461
"alert_topic": "test kapacitor alert topic",
94629462
"alert_id": "foo/bar/bat",
94639463
"message": "test teams message",

services/teams/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (s *Service) StateChangesOnly() bool {
7070
}
7171

7272
type testOptions struct {
73-
ChannelURL string `json:"channel-url"`
73+
ChannelURL string `json:"channel_url"`
7474
AlertTopic string `json:"alert_topic"`
7575
AlertID string `json:"alert_id"`
7676
Message string `json:"message"`

0 commit comments

Comments
 (0)