diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-16 02:18:09 +0800 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-11-15 18:18:09 +0000 |
commit | e0e44731723332ac49bb22e6d6d84ae4f92be067 (patch) | |
tree | 1af776de538d109e885cf971b7dd534b74afe926 /models/issue_assignees.go | |
parent | c58fba944d701336daab57f0f0647850f7bb671f (diff) | |
download | gitea-e0e44731723332ac49bb22e6d6d84ae4f92be067.tar.gz gitea-e0e44731723332ac49bb22e6d6d84ae4f92be067.zip |
extract some inline functions related with create comment (#8931)
Diffstat (limited to 'models/issue_assignees.go')
-rw-r--r-- | models/issue_assignees.go | 11 |
1 files changed, 9 insertions, 2 deletions
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 |