diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2023-04-11 17:56:57 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2023-04-12 13:55:59 +0200 |
| commit | 02abcd096cbcce690366f853c8bc065d22aa205c (patch) | |
| tree | 0fd1f97b51dd88b2a5250e679ac59c57836ada28 | |
| parent | ed75c0a7f1b7d6758be3942746675ff94071d154 (diff) | |
dashboard: introduce DiscussionReminder type
Bugs are also mentioned in mass reminders, treat it as a separate
discussion type.
Later we'll want to limit the number of DiscussionReminder discussions
we show on a bug page, so this information will be very useful.
| -rw-r--r-- | dashboard/app/main.go | 2 | ||||
| -rw-r--r-- | dashboard/app/reporting_email.go | 4 | ||||
| -rw-r--r-- | dashboard/dashapi/dashapi.go | 5 | ||||
| -rw-r--r-- | tools/syz-lore/query_lkml.go | 2 |
4 files changed, 11 insertions, 2 deletions
diff --git a/dashboard/app/main.go b/dashboard/app/main.go index 4e68de311..732ef8362 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -827,6 +827,8 @@ func makeBugSubsystemUI(c context.Context, bug *Bug, entry BugSubsystem) *uiBugS func getBugDiscussionsUI(c context.Context, bug *Bug) ([]*uiBugDiscussion, error) { // TODO: also include dup bug discussions. + // TODO: limit the number of DiscussionReminder type entries, e.g. all with + // external replies + one latest. var list []*uiBugDiscussion discussions, err := discussionsForBug(c, bug.key(c)) if err != nil { diff --git a/dashboard/app/reporting_email.go b/dashboard/app/reporting_email.go index 67c8258e8..56ea74bcb 100644 --- a/dashboard/app/reporting_email.go +++ b/dashboard/app/reporting_email.go @@ -561,6 +561,10 @@ func processDiscussionEmail(c context.Context, msg *email.Email, source dashapi. } extIDs := []string{} for _, id := range msg.BugIDs { + if isBugListHash(id) { + dType = dashapi.DiscussionReminder + continue + } _, _, err := findBugByReportingID(c, id) if err == nil { extIDs = append(extIDs, id) diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go index 1195a9744..e18a8b62d 100644 --- a/dashboard/dashapi/dashapi.go +++ b/dashboard/dashapi/dashapi.go @@ -580,8 +580,9 @@ const ( type DiscussionType string const ( - DiscussionReport DiscussionType = "report" - DiscussionPatch DiscussionType = "patch" + DiscussionReport DiscussionType = "report" + DiscussionPatch DiscussionType = "patch" + DiscussionReminder DiscussionType = "reminder" ) type Discussion struct { diff --git a/tools/syz-lore/query_lkml.go b/tools/syz-lore/query_lkml.go index 4b59b6393..fed69eede 100644 --- a/tools/syz-lore/query_lkml.go +++ b/tools/syz-lore/query_lkml.go @@ -59,6 +59,8 @@ func main() { discType := dashapi.DiscussionReport if strings.Contains(thread.Subject, "PATCH") { discType = dashapi.DiscussionPatch + } else if strings.Contains(thread.Subject, "Monthly") { + discType = dashapi.DiscussionReminder } log.Printf("saving %d/%d", i+1, len(threads)) err := dash.SaveDiscussion(&dashapi.SaveDiscussionReq{ |
