Skip to content

Commit 16354ee

Browse files
Add hal to echo converter for microsoft team (#155)
1 parent cb975ff commit 16354ee

File tree

4 files changed

+90
-68
lines changed

4 files changed

+90
-68
lines changed

api/client/config/echo.pb.go

Lines changed: 77 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/proto/config/echo.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import "google/protobuf/wrappers.proto";
88
import "artifact/artifacts.proto";
99
import "ci/gcb.proto";
1010
import "notification/github_status.proto";
11+
import "notification/microsoft_teams.proto";
1112
import "notification/slack.proto";
1213
import "notification/twilio.proto";
1314
import "pubsub/pubsub.proto";
@@ -25,6 +26,8 @@ message Echo {
2526
Stats stats = 7;
2627
Scheduler scheduler = 8;
2728

29+
notification.MicrosoftTeams microsoftteams = 9;
30+
2831
// Echo scheduler configuration.
2932
message Scheduler {
3033

docs/docs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3813,6 +3813,7 @@ Configuration for the echo microservice.
38133813
| gcb | [proto.ci.GoogleCloudBuild](#proto.ci.GoogleCloudBuild) | | |
38143814
| stats | [Echo.Stats](#proto.config.Echo.Stats) | | |
38153815
| scheduler | [Echo.Scheduler](#proto.config.Echo.Scheduler) | | |
3816+
| microsoftteams | [proto.notification.MicrosoftTeams](#proto.notification.MicrosoftTeams) | | |
38163817

38173818

38183819

internal/convert/echo.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ import (
2525
// HalToEcho generates the echo config for the supplied config.Hal h.
2626
func HalToEcho(h *config.Hal) *config.Echo {
2727
return &config.Echo{
28-
Slack: h.GetNotifications().GetSlack(),
29-
Twilio: h.GetNotifications().GetTwilio(),
30-
GithubStatus: h.GetNotifications().GetGithubStatus(),
31-
Artifacts: h.GetArtifacts(),
32-
Pubsub: h.GetPubsub(),
33-
Gcb: h.GetCi().GetGcb(),
34-
Stats: getEchoStats(h),
35-
Scheduler: getEchoScheduler(h),
28+
Slack: h.GetNotifications().GetSlack(),
29+
Twilio: h.GetNotifications().GetTwilio(),
30+
GithubStatus: h.GetNotifications().GetGithubStatus(),
31+
Artifacts: h.GetArtifacts(),
32+
Pubsub: h.GetPubsub(),
33+
Gcb: h.GetCi().GetGcb(),
34+
Stats: getEchoStats(h),
35+
Scheduler: getEchoScheduler(h),
36+
Microsoftteams: h.GetNotifications().GetMicrosoftteams(),
3637
}
3738
}
3839

0 commit comments

Comments
 (0)