forked from kevadesu/forgejo
Revert "Prevent allow/reject reviews on merged/closed PRs"
This reverts commit4ed372af13
. This change from Gitea was not considered by the Forgejo UI team and there is a consensus that it feels like a regression. The test which was added in that commit is kept and modified to test that reviews can successfully be submitted on closed and merged PRs. Closes forgejo/design#11 (cherry picked from commit65c2595f26
)
This commit is contained in:
parent
35c206317b
commit
dfd3ac01d7
5 changed files with 45 additions and 41 deletions
|
@ -248,8 +248,6 @@ func SubmitReview(ctx *context.Context) {
|
|||
if issues_model.IsContentEmptyErr(err) {
|
||||
ctx.Flash.Error(ctx.Tr("repo.issues.review.content.empty"))
|
||||
ctx.JSONRedirect(fmt.Sprintf("%s/pulls/%d/files", ctx.Repo.RepoLink, issue.Index))
|
||||
} else if errors.Is(err, pull_service.ErrSubmitReviewOnClosedPR) {
|
||||
ctx.Status(http.StatusUnprocessableEntity)
|
||||
} else {
|
||||
ctx.ServerError("SubmitReview", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue