diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-14 10:57:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-14 10:57:36 +0800 |
commit | dad67cae5455f346f122ab26ec50ac4e029cacf4 (patch) | |
tree | e16407c08bb1c5ca07b9f3601e55e2c13eb79ac8 /models/issue_comment.go | |
parent | 16a43156a85710fd01fc7d8e5092fb82371fa271 (diff) | |
download | gitea-dad67cae5455f346f122ab26ec50ac4e029cacf4.tar.gz gitea-dad67cae5455f346f122ab26ec50ac4e029cacf4.zip |
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
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r-- | models/issue_comment.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go index 63f5f6b778..c7e9e7cdfa 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -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. |