Skip to content

Commit

Permalink
Merge pull request #204 from tstromberg/dupe-tags
Browse files Browse the repository at this point in the history
Fix missing call to dedup tags after refactor
  • Loading branch information
tstromberg authored Aug 19, 2020
2 parents da9ed06 + 6148281 commit 1dd4c54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/hubbub/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions pkg/hubbub/pull_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 1dd4c54

Please sign in to comment.