diff --git a/cmd/server/main.go b/cmd/server/main.go index e075872..4441fda 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -140,9 +140,14 @@ func main() { } klog.Infof("Loaded %d rules", len(ts)) + + // Establish site name based on the first available + // of: CLI parameter, settings file, or default from repo names. sn := *siteName if sn == "" { - sn = calculateSiteName(ts) + if sn = tp.Name(); sn == "" { + sn = calculateSiteName(ts) + } } u := updater.New(updater.Config{ diff --git a/pkg/triage/triage.go b/pkg/triage/triage.go index 5c7fa85..3b10041 100644 --- a/pkg/triage/triage.go +++ b/pkg/triage/triage.go @@ -342,3 +342,8 @@ func processRules(raw map[string]Rule) (map[string]Rule, error) { func (p *Party) ConversationsTotal() int { return p.engine.ConversationsTotal() } + +// Name returns the configured site name +func (p *Party) Name() string { + return p.settings.Name +}