From 6148281597ba06dbd84a94439438be85c3263b5c Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Wed, 19 Aug 2020 08:55:19 -0700 Subject: [PATCH] Fix missing call to dedup tags after refactor --- pkg/hubbub/issue.go | 2 ++ pkg/hubbub/pull_requests.go | 1 + 2 files changed, 3 insertions(+) diff --git a/pkg/hubbub/issue.go b/pkg/hubbub/issue.go index df0a5b5..a0e94a1 100644 --- a/pkg/hubbub/issue.go +++ b/pkg/hubbub/issue.go @@ -24,6 +24,7 @@ import ( "github.com/google/go-github/v31/github" "github.com/google/triage-party/pkg/logu" "github.com/google/triage-party/pkg/persist" + "github.com/google/triage-party/pkg/tag" "gopkg.in/yaml.v2" "k8s.io/klog/v2" ) @@ -204,6 +205,7 @@ func (h *Engine) createIssueSummary(i *github.Issue, cs []*github.IssueComment, } co.ClosedBy = i.GetClosedBy() + co.Tags = tag.Dedup(co.Tags) sort.Slice(co.Tags, func(i, j int) bool { return co.Tags[i].ID < co.Tags[j].ID }) return co } diff --git a/pkg/hubbub/pull_requests.go b/pkg/hubbub/pull_requests.go index fbb8690..cab24a3 100644 --- a/pkg/hubbub/pull_requests.go +++ b/pkg/hubbub/pull_requests.go @@ -281,6 +281,7 @@ func (h *Engine) createPRSummary(ctx context.Context, pr *github.PullRequest, cs co.Tags = append(co.Tags, tag.Merged) } + co.Tags = tag.Dedup(co.Tags) sort.Slice(co.Tags, func(i, j int) bool { return co.Tags[i].ID < co.Tags[j].ID }) return co }