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

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.
pull/34577/head^2
badhezi 2025-06-03 21:50:53 +03:00 committed by GitHub
parent fe57ee3074
commit 79cc369892
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

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)
}