Remove unnecessary changes

This commit is contained in:
Lunny Xiao 2024-04-18 17:46:15 +08:00
parent 7ba4d009c2
commit 5ff68886ca
2 changed files with 1 additions and 7 deletions

View File

@ -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) {

View File

@ -269,7 +269,6 @@ func SubmitReview(ctx *context.Context) {
}
return
}
ctx.JSONRedirect(fmt.Sprintf("%s/pulls/%d#%s", ctx.Repo.RepoLink, issue.Index, comm.HashTag()))
}