Skip to content

Commit 728aa21

Browse files
tatianabgopherbot
authored andcommitted
cmd/vulnreport: remove NeedsTriage when adding triaged label
Change-Id: I19a659045e2cf6b13bac763bdb362bbf1c0d2312 Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/640915 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Zvonimir Pavlinovic <[email protected]> Auto-Submit: Tatiana Bradley <[email protected]>
1 parent a2c4187 commit 728aa21

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

cmd/vulnreport/creator.go

+1
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ const (
286286
labelSuggestedEdit = "Suggested Edit"
287287
labelNeedsAlias = "NeedsAlias"
288288
labelTriaged = "triaged"
289+
labelNeedsTriage = "NeedsTriage"
289290
labelHighPriority = "high priority"
290291
labelFirstParty = "first party"
291292
labelPossiblyNotGo = "possibly not Go"

cmd/vulnreport/triage.go

+7
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ func (t *triage) editIssue(ctx context.Context, iss *issues.Issue, labels, comme
159159
slices.Sort(comments)
160160
comments = slices.Compact(comments)
161161

162+
// Remove the needs triage label if the triaged label is present.
163+
if slices.Contains(labels, labelTriaged) {
164+
labels = slices.DeleteFunc(labels, func(l string) bool {
165+
return l == labelNeedsTriage
166+
})
167+
}
168+
162169
if *dry {
163170
if len(labels) != 0 {
164171
log.Infof("issue #%d: would set labels: [%s]", iss.Number, strings.Join(labels, ", "))

0 commit comments

Comments
 (0)