diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2026-01-15 12:50:59 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2026-01-15 12:26:32 +0000 |
| commit | e30f059fce4242956bd289e6690b150ddc6cd0d5 (patch) | |
| tree | f68cba31f5d79a20e4dea1fe7860595de652a987 /dashboard/app/reporting.go | |
| parent | 41cfbc00ddb9f36db18d9e02ddd517d65ae1177c (diff) | |
dashboard: add a manuallyUpstreamed helper
This helper function can be used in the reporting filtering rules to
skip certain reporting stages depending on whether the previous stage(s)
have been manually upstreamed.
Add tests that it does have the intended effect.
Cc #6554.
Diffstat (limited to 'dashboard/app/reporting.go')
| -rw-r--r-- | dashboard/app/reporting.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go index 61bee541d..ad55ac6c3 100644 --- a/dashboard/app/reporting.go +++ b/dashboard/app/reporting.go @@ -387,6 +387,14 @@ func (bug *Bug) managerConfig(c context.Context) *ConfigManager { return &mgr } +func (bug *Bug) manuallyUpstreamed(name string) bool { + reporting := bugReportingByName(bug, name) + if reporting == nil { + return false + } + return !reporting.Closed.IsZero() && !reporting.Auto +} + func createNotification(c context.Context, typ dashapi.BugNotif, public bool, text string, bug *Bug, reporting *Reporting, bugReporting *BugReporting) (*dashapi.BugNotification, error) { reportingConfig, err := json.Marshal(reporting.Config) |
