From e0e44731723332ac49bb22e6d6d84ae4f92be067 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 16 Nov 2019 02:18:09 +0800 Subject: extract some inline functions related with create comment (#8931) --- models/issue_assignees.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'models/issue_assignees.go') diff --git a/models/issue_assignees.go b/models/issue_assignees.go index 70bed039c2..4d71cc6e51 100644 --- a/models/issue_assignees.go +++ b/models/issue_assignees.go @@ -120,9 +120,16 @@ func (issue *Issue) toggleAssignee(sess *xorm.Session, doer *User, assigneeID in } // Comment - comment, err = createAssigneeComment(sess, doer, issue.Repo, issue, assigneeID, removed) + comment, err = createComment(sess, &CreateCommentOptions{ + Type: CommentTypeAssignees, + Doer: doer, + Repo: issue.Repo, + Issue: issue, + RemovedAssignee: removed, + AssigneeID: assigneeID, + }) if err != nil { - return false, nil, fmt.Errorf("createAssigneeComment: %v", err) + return false, nil, fmt.Errorf("createComment: %v", err) } // if pull request is in the middle of creation - don't call webhook -- cgit v1.2.3