Fix wrong milestone in webhook message (#11596) (#11612)

Backport of #11596

Signed-off-by: Gary Kim <gary@garykim.dev>
pull/11598/head^2
Gary Kim 5 years ago committed by GitHub
parent b52e8de7de
commit a854846f06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      models/issue.go

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

Loading…
Cancel
Save