Skip to content

Commit c60bc26

Browse files
GiteaBotbadhezi
andauthored
Fix issue label delete incorrect labels webhook payload (#34575) (#34603)
Backport #34575 by @badhezi Fixes #34560 explanation of the bug in the issue setting `issue.isLabelsLoaded = false` before calling `deleteIssueLabel` guarantee we will load the new state of the labels into the issue object before sending it in the webhook. Co-authored-by: badhezi <[email protected]>
1 parent bacc69d commit c60bc26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

models/issues/issue_label.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ func DeleteIssueLabel(ctx context.Context, issue *Issue, label *Label, doer *use
206206
}
207207

208208
issue.Labels = nil
209+
issue.isLabelsLoaded = false
209210
return issue.LoadLabels(ctx)
210211
}
211212

0 commit comments

Comments
 (0)