From 6b7e906bb1dbb3bd49f58b79b00ea928ade236ba Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 17 May 2023 18:18:03 +0200 Subject: dashboard: send per-label notifications If the label is not user-set and the config specifies a message for it, send a bug notification. If the label is related to bug origin testing, attach the list of tested trees. --- dashboard/dashapi/dashapi.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dashboard/dashapi') diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go index 161794e9f..6227b6da9 100644 --- a/dashboard/dashapi/dashapi.go +++ b/dashboard/dashapi/dashapi.go @@ -530,6 +530,7 @@ type BugUpdate struct { Link string Status BugStatus StatusReason BugStatusReason + Label string // the reported label, if BugNotifLabel ReproLevel ReproLevel DupOf string OnHold bool // If set for open bugs, don't upstream this bug. @@ -571,10 +572,12 @@ type BugNotification struct { ExtID string // arbitrary reporting ID forwarded from BugUpdate.ExtID Title string Text string // meaning depends on Type + Label string // for BugNotifLabel Type specifies the exact label CC []string // deprecated in favor of Recipients Maintainers []string // deprecated in favor of Recipients Link string Recipients Recipients + TreeJobs []*JobInfo // set for some BugNotifLabel // Public is what we want all involved people to see (e.g. if we notify about a wrong commit title, // people need to see it and provide the right title). Not public is what we want to send only // to a minimal set of recipients (our mailing list) (e.g. notification about an obsoleted bug @@ -841,6 +844,9 @@ const ( BugNotifObsoleted // Bug fixing commit can't be discovered (wrong commit title). BugNotifBadCommit + // New bug label has been assigned (only if enabled). + // Text contains the custome message that needs to be delivered to the user. + BugNotifLabel ) const ( -- cgit mrf-deployment