fix duplicated webhook when creating issue with assignees (#7681)
parent
ce27e48fe3
commit
0742f717ad
|
@ -142,11 +142,15 @@ func (issue *Issue) ChangeAssignee(doer *User, assigneeID int64) (err error) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return sess.Commit()
|
if err := sess.Commit(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
go HookQueue.Add(issue.RepoID)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (issue *Issue) changeAssignee(sess *xorm.Session, doer *User, assigneeID int64, isCreate bool) (err error) {
|
func (issue *Issue) changeAssignee(sess *xorm.Session, doer *User, assigneeID int64, isCreate bool) (err error) {
|
||||||
|
|
||||||
// Update the assignee
|
// Update the assignee
|
||||||
removed, err := updateIssueAssignee(sess, issue, assigneeID)
|
removed, err := updateIssueAssignee(sess, issue, assigneeID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -209,7 +213,6 @@ func (issue *Issue) changeAssignee(sess *xorm.Session, doer *User, assigneeID in
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
go HookQueue.Add(issue.RepoID)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue