fix: labels are missing in the pull request payload removing a label

When ReplaceIssueLabels calls issue.LoadLabels it was a noop because
issue.isLabelsLoaded is still set to true because of the call  to
issue.LoadLabels that was done at the beginning of the function.
This commit is contained in:
Earl Warren 2024-11-06 15:36:02 +01:00
parent 0fb48872ac
commit c801838690
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 133 additions and 56 deletions

View file

@ -496,6 +496,7 @@ func ReplaceIssueLabels(ctx context.Context, issue *Issue, labels []*Label, doer
}
}
issue.isLabelsLoaded = false
issue.Labels = nil
if err = issue.LoadLabels(ctx); err != nil {
return err