diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2023-05-25 13:14:16 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2023-05-25 14:59:38 +0200 |
| commit | d608a2afc4289e56fe35af894ff9eb3f56f4fcb4 (patch) | |
| tree | 8092dba0ac1da1d0082c88bc2758254bce7d2aaf /dashboard/app/reporting.go | |
| parent | 6b7e906bb1dbb3bd49f58b79b00ea928ade236ba (diff) | |
dashboard: include label message into bug reports
Diffstat (limited to 'dashboard/app/reporting.go')
| -rw-r--r-- | dashboard/app/reporting.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go index d0b61bbf1..f75b2d318 100644 --- a/dashboard/app/reporting.go +++ b/dashboard/app/reporting.go @@ -547,6 +547,16 @@ func crashBugReport(c context.Context, bug *Bug, crash *Crash, crashKey *db.Key, rep.Maintainers = append(rep.Maintainers, mgr.CC.BuildMaintainers...) } } + for _, label := range bug.Labels { + text, ok := reporting.Labels[label.String()] + if !ok { + continue + } + if rep.LabelMessages == nil { + rep.LabelMessages = map[string]string{} + } + rep.LabelMessages[label.String()] = text + } if err := fillBugReport(c, rep, bug, bugReporting, build); err != nil { return nil, err } @@ -1071,8 +1081,8 @@ func incomingCommandCmd(c context.Context, now time.Time, cmd *dashapi.BugUpdate if cmd.StatusReason != "" { bug.StatusReason = cmd.StatusReason } - if cmd.Label != "" { - bugReporting.AddLabel(cmd.Label) + for _, label := range cmd.Labels { + bugReporting.AddLabel(label) } return true, "", nil } |
