mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-31 13:02:52 +09:00
Refactor pull request review (#8954)
* refactor submit review * remove unnecessary code * remove unused comment * fix lint * remove duplicated actions * remove duplicated actions * fix typo * fix comment content
This commit is contained in:
@ -539,8 +539,10 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err = sendCreateCommentAction(e, opts, comment); err != nil {
|
||||
return nil, err
|
||||
if !opts.NoAction {
|
||||
if err = sendCreateCommentAction(e, opts, comment); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if err = comment.addCrossReferences(e, opts.Doer); err != nil {
|
||||
@ -816,6 +818,7 @@ type CreateCommentOptions struct {
|
||||
RefCommentID int64
|
||||
RefAction references.XRefAction
|
||||
RefIsPull bool
|
||||
NoAction bool
|
||||
}
|
||||
|
||||
// CreateComment creates comment of issue or commit.
|
||||
|
Reference in New Issue
Block a user