1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-16 15:28:37 +00:00

Fix issue label delete incorrect labels webhook payload (#34575) (#34603)

Backport #34575 by @badhezi

Fixes https://github.com/go-gitea/gitea/issues/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 <zlilaharon@gmail.com>
This commit is contained in:
Giteabot
2025-06-05 00:41:01 +08:00
committed by GitHub
parent bacc69db83
commit c60bc26fd3

View File

@@ -206,6 +206,7 @@ func DeleteIssueLabel(ctx context.Context, issue *Issue, label *Label, doer *use
}
issue.Labels = nil
issue.isLabelsLoaded = false
return issue.LoadLabels(ctx)
}