diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-12-02 22:43:39 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-12-02 16:43:39 +0200 |
commit | 6e81eafdd6b5db756d4ea30d759bac944b80e2de (patch) | |
tree | c9aea9ae31880cff79bf4ef3de55ad5f810f5ff7 /models/issue.go | |
parent | 2fc3eb1d152830001ea5e8655b082adcb7adaab9 (diff) | |
download | gitea-6e81eafdd6b5db756d4ea30d759bac944b80e2de.tar.gz gitea-6e81eafdd6b5db756d4ea30d759bac944b80e2de.zip |
Remove unused comment actions (#9222)
* Remove unused comment actions
* improve code
Diffstat (limited to 'models/issue.go')
-rw-r--r-- | models/issue.go | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/models/issue.go b/models/issue.go index a3597f1585..0a08a97fdd 100644 --- a/models/issue.go +++ b/models/issue.go @@ -721,13 +721,9 @@ func (issue *Issue) ChangeTitle(doer *User, oldTitle string) (err error) { OldTitle: oldTitle, NewTitle: issue.Title, } - comment, err := createCommentWithNoAction(sess, opts) - if err != nil { + if _, err = createCommentWithNoAction(sess, opts); err != nil { return fmt.Errorf("createComment: %v", err) } - if err = sendCreateCommentAction(sess, opts, comment); err != nil { - return err - } if err = issue.addCrossReferences(sess, doer, true); err != nil { return err } @@ -753,11 +749,7 @@ func AddDeletePRBranchComment(doer *User, repo *Repository, issueID int64, branc Issue: issue, CommitSHA: branchName, } - comment, err := createCommentWithNoAction(sess, opts) - if err != nil { - return err - } - if err = sendCreateCommentAction(sess, opts, comment); err != nil { + if _, err = createCommentWithNoAction(sess, opts); err != nil { return err } @@ -899,12 +891,7 @@ func newIssue(e *xorm.Session, doer *User, opts NewIssueOptions) (err error) { OldMilestoneID: 0, MilestoneID: opts.Issue.MilestoneID, } - comment, err := createCommentWithNoAction(e, opts) - if err != nil { - return err - } - - if err = sendCreateCommentAction(e, opts, comment); err != nil { + if _, err = createCommentWithNoAction(e, opts); err != nil { return err } } |