|
|
@@ -879,7 +879,7 @@ func dismissReview(ctx *context.APIContext, msg string, isDismiss, dismissPriors |
|
|
|
ctx.Error(http.StatusForbidden, "", "Must be repo admin") |
|
|
|
return |
|
|
|
} |
|
|
|
review, pr, isWrong := prepareSingleReview(ctx) |
|
|
|
review, _, isWrong := prepareSingleReview(ctx) |
|
|
|
if isWrong { |
|
|
|
return |
|
|
|
} |
|
|
@@ -889,11 +889,6 @@ func dismissReview(ctx *context.APIContext, msg string, isDismiss, dismissPriors |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if pr.Issue.IsClosed { |
|
|
|
ctx.Error(http.StatusForbidden, "", "not need to dismiss this review because this pr is closed") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
_, err := pull_service.DismissReview(ctx, review.ID, ctx.Repo.Repository.ID, msg, ctx.Doer, isDismiss, dismissPriors) |
|
|
|
if err != nil { |
|
|
|
if pull_service.IsErrDismissRequestOnClosedPR(err) { |