mirror of
https://github.com/go-gitea/gitea
synced 2025-08-09 02:58:20 +00:00
Hotfix for review actions and notifications (#8965)
This commit is contained in:
@@ -174,6 +174,12 @@ func SubmitReview(ctx *context.Context, form auth.SubmitReviewForm) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Hotfix 1.10.0: make sure the review exists before creating the head comment
|
||||
if err = review.Publish(); err != nil {
|
||||
ctx.ServerError("Publish", err)
|
||||
return
|
||||
}
|
||||
comm, err := models.CreateComment(&models.CreateCommentOptions{
|
||||
Type: models.CommentTypeReview,
|
||||
Doer: ctx.User,
|
||||
@@ -186,10 +192,6 @@ func SubmitReview(ctx *context.Context, form auth.SubmitReviewForm) {
|
||||
ctx.ServerError("CreateComment", err)
|
||||
return
|
||||
}
|
||||
if err = review.Publish(); err != nil {
|
||||
ctx.ServerError("Publish", err)
|
||||
return
|
||||
}
|
||||
|
||||
pr, err := issue.GetPullRequest()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user