Skip to content

Commit 5ff6888

Browse files
committed
Remove unnecessary changes
1 parent 7ba4d00 commit 5ff6888

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

routers/api/v1/repo/pull_review.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ func dismissReview(ctx *context.APIContext, msg string, isDismiss, dismissPriors
879879
ctx.Error(http.StatusForbidden, "", "Must be repo admin")
880880
return
881881
}
882-
review, pr, isWrong := prepareSingleReview(ctx)
882+
review, _, isWrong := prepareSingleReview(ctx)
883883
if isWrong {
884884
return
885885
}
@@ -889,11 +889,6 @@ func dismissReview(ctx *context.APIContext, msg string, isDismiss, dismissPriors
889889
return
890890
}
891891

892-
if pr.Issue.IsClosed {
893-
ctx.Error(http.StatusForbidden, "", "not need to dismiss this review because this pr is closed")
894-
return
895-
}
896-
897892
_, err := pull_service.DismissReview(ctx, review.ID, ctx.Repo.Repository.ID, msg, ctx.Doer, isDismiss, dismissPriors)
898893
if err != nil {
899894
if pull_service.IsErrDismissRequestOnClosedPR(err) {

routers/web/repo/pull_review.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ func SubmitReview(ctx *context.Context) {
269269
}
270270
return
271271
}
272-
273272
ctx.JSONRedirect(fmt.Sprintf("%s/pulls/%d#%s", ctx.Repo.RepoLink, issue.Index, comm.HashTag()))
274273
}
275274

0 commit comments

Comments
 (0)