Skip to content

Commit eb5ea5f

Browse files
gary-kimzeripathtechknowlogick
authored
Fix wrong milestone in webhook message (#11596) (#11611)
Backport of #11596 Signed-off-by: Gary Kim <[email protected]> Co-authored-by: zeripath <[email protected]> Co-authored-by: techknowlogick <[email protected]>
1 parent 5e3dd3f commit eb5ea5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/issue.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func (issue *Issue) loadReactions(e Engine) (err error) {
249249
}
250250

251251
func (issue *Issue) loadMilestone(e Engine) (err error) {
252-
if issue.Milestone == nil && issue.MilestoneID > 0 {
252+
if (issue.Milestone == nil || issue.Milestone.ID != issue.MilestoneID) && issue.MilestoneID > 0 {
253253
issue.Milestone, err = getMilestoneByRepoID(e, issue.RepoID, issue.MilestoneID)
254254
if err != nil && !IsErrMilestoneNotExist(err) {
255255
return fmt.Errorf("getMilestoneByRepoID [repo_id: %d, milestone_id: %d]: %v", issue.RepoID, issue.MilestoneID, err)

0 commit comments

Comments
 (0)