Просмотр исходного кода

Remove unnecessary changes

pull/25741/head
Lunny Xiao 1 месяц назад
Родитель
Сommit
5ff68886ca
2 измененных файлов: 1 добавлений и 7 удалений
  1. 1
    6
      routers/api/v1/repo/pull_review.go
  2. 0
    1
      routers/web/repo/pull_review.go

+ 1
- 6
routers/api/v1/repo/pull_review.go Просмотреть файл

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

+ 0
- 1
routers/web/repo/pull_review.go Просмотреть файл

@@ -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()))
}


Загрузка…
Отмена
Сохранить