summaryrefslogtreecommitdiffstats
path: root/models/issue_assignees.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-11-16 02:18:09 +0800
committerzeripath <art27@cantab.net>2019-11-15 18:18:09 +0000
commite0e44731723332ac49bb22e6d6d84ae4f92be067 (patch)
tree1af776de538d109e885cf971b7dd534b74afe926 /models/issue_assignees.go
parentc58fba944d701336daab57f0f0647850f7bb671f (diff)
downloadgitea-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.go11
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