mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-23 14:00:03 +02:00
extract some inline functions related with create comment (#8931)
This commit is contained in:
parent
c58fba944d
commit
e0e4473172
5 changed files with 65 additions and 88 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue