mirror of
https://github.com/go-gitea/gitea
synced 2025-07-04 01:27:20 +00:00
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.
This commit is contained in:
@ -206,6 +206,7 @@ func DeleteIssueLabel(ctx context.Context, issue *Issue, label *Label, doer *use
|
|||||||
}
|
}
|
||||||
|
|
||||||
issue.Labels = nil
|
issue.Labels = nil
|
||||||
|
issue.isLabelsLoaded = false
|
||||||
return issue.LoadLabels(ctx)
|
return issue.LoadLabels(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user