mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 08:48:37 +00:00
Extract createComment (#9125)
* Extract createComment * fix lint * fix lint
This commit is contained in:
committed by
techknowlogick
parent
7c6f2e27be
commit
2011a5b818
@@ -386,7 +386,20 @@ func changeMilestoneAssign(e *xorm.Session, doer *User, issue *Issue, oldMilesto
|
||||
return err
|
||||
}
|
||||
|
||||
if _, err := createMilestoneComment(e, doer, issue.Repo, issue, oldMilestoneID, issue.MilestoneID); err != nil {
|
||||
var opts = &CreateCommentOptions{
|
||||
Type: CommentTypeMilestone,
|
||||
Doer: doer,
|
||||
Repo: issue.Repo,
|
||||
Issue: issue,
|
||||
OldMilestoneID: oldMilestoneID,
|
||||
MilestoneID: issue.MilestoneID,
|
||||
}
|
||||
comment, err := createCommentWithNoAction(e, opts)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := sendCreateCommentAction(e, opts, comment); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user