From 50b43cfb66a46fb5579e71d0e55174bb77fa2858 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Wed, 15 Dec 2021 13:51:44 -0500 Subject: fix(ops/besadii): Don't send notifications for CI status Don't notify reviewers ever on CI status changes, and only notify the owner if the build fails. Change-Id: If2cf63581b49e3de77181024ce8a4213031f4bd5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4337 Tested-by: BuildkiteCI Reviewed-by: tazjin Autosubmit: grfn --- ops/besadii/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ops/besadii/main.go b/ops/besadii/main.go index 556725185212..dd009e6babeb 100644 --- a/ops/besadii/main.go +++ b/ops/besadii/main.go @@ -98,6 +98,7 @@ type reviewInput struct { OmitDuplicateComments bool `json:"omit_duplicate_comments"` IgnoreDefaultAttentionSetRules bool `json:"ignore_default_attention_set_rules"` Tag string `json:"tag"` + Notify string `json:"notify,omitempty"` } func defaultConfigLocation() (string, error) { @@ -262,6 +263,8 @@ func triggerBuild(cfg *config, log *syslog.Writer, trigger *buildTrigger) error // Do not update the attention set for this comment. IgnoreDefaultAttentionSetRules: true, + + Notify: "NONE", } updateGerrit(cfg, review, trigger.changeId, trigger.patchset) @@ -449,13 +452,16 @@ func postCommandMain(cfg *config) { var vote int var verb string + var notify string if os.Getenv("BUILDKITE_COMMAND_EXIT_STATUS") == "0" { vote = 1 // automation passed: +1 in Gerrit verb = "passed" + notify = "NONE" } else { vote = -1 verb = "failed" + notify = "OWNER" } msg := fmt.Sprintf("Build of patchset %s %s: %s", patchset, verb, os.Getenv("BUILDKITE_BUILD_URL")) @@ -470,6 +476,8 @@ func postCommandMain(cfg *config) { IgnoreDefaultAttentionSetRules: vote == 1, Tag: "autogenerated:buildkite~result", + + Notify: notify, } updateGerrit(cfg, review, changeId, patchset) } -- cgit 1.4.1