@@ -721,13 +721,9 @@ func (issue *Issue) ChangeTitle(doer *User, oldTitle string) (err error) {
721
721
OldTitle : oldTitle ,
722
722
NewTitle : issue .Title ,
723
723
}
724
- comment , err := createCommentWithNoAction (sess , opts )
725
- if err != nil {
724
+ if _ , err = createCommentWithNoAction (sess , opts ); err != nil {
726
725
return fmt .Errorf ("createComment: %v" , err )
727
726
}
728
- if err = sendCreateCommentAction (sess , opts , comment ); err != nil {
729
- return err
730
- }
731
727
if err = issue .addCrossReferences (sess , doer , true ); err != nil {
732
728
return err
733
729
}
@@ -753,11 +749,7 @@ func AddDeletePRBranchComment(doer *User, repo *Repository, issueID int64, branc
753
749
Issue : issue ,
754
750
CommitSHA : branchName ,
755
751
}
756
- comment , err := createCommentWithNoAction (sess , opts )
757
- if err != nil {
758
- return err
759
- }
760
- if err = sendCreateCommentAction (sess , opts , comment ); err != nil {
752
+ if _ , err = createCommentWithNoAction (sess , opts ); err != nil {
761
753
return err
762
754
}
763
755
@@ -899,12 +891,7 @@ func newIssue(e *xorm.Session, doer *User, opts NewIssueOptions) (err error) {
899
891
OldMilestoneID : 0 ,
900
892
MilestoneID : opts .Issue .MilestoneID ,
901
893
}
902
- comment , err := createCommentWithNoAction (e , opts )
903
- if err != nil {
904
- return err
905
- }
906
-
907
- if err = sendCreateCommentAction (e , opts , comment ); err != nil {
894
+ if _ , err = createCommentWithNoAction (e , opts ); err != nil {
908
895
return err
909
896
}
910
897
}
0 commit comments