mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-02 16:35:19 +02:00
Remove unused comment actions (#9222)
* Remove unused comment actions * improve code
This commit is contained in:
parent
2fc3eb1d15
commit
6e81eafdd6
6 changed files with 10 additions and 55 deletions
|
@ -678,7 +678,7 @@ func createDeadlineComment(e *xorm.Session, doer *User, issue *Issue, newDeadlin
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return comment, sendCreateCommentAction(e, opts, comment)
|
||||
return comment, nil
|
||||
}
|
||||
|
||||
// Creates issue dependency comment
|
||||
|
@ -699,13 +699,9 @@ func createIssueDependencyComment(e *xorm.Session, doer *User, issue *Issue, dep
|
|||
Issue: issue,
|
||||
DependentIssueID: dependentIssue.ID,
|
||||
}
|
||||
comment, err := createCommentWithNoAction(e, opts)
|
||||
if err != nil {
|
||||
if _, err = createCommentWithNoAction(e, opts); err != nil {
|
||||
return
|
||||
}
|
||||
if err = sendCreateCommentAction(e, opts, comment); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
opts = &CreateCommentOptions{
|
||||
Type: cType,
|
||||
|
@ -714,14 +710,7 @@ func createIssueDependencyComment(e *xorm.Session, doer *User, issue *Issue, dep
|
|||
Issue: dependentIssue,
|
||||
DependentIssueID: issue.ID,
|
||||
}
|
||||
comment, err = createCommentWithNoAction(e, opts)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if err = sendCreateCommentAction(e, opts, comment); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = createCommentWithNoAction(e, opts)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue