@@ -823,7 +823,7 @@ func DismissPullReview(ctx *context.APIContext) {
823
823
// "422":
824
824
// "$ref": "#/responses/validationError"
825
825
opts := web .GetForm (ctx ).(* api.DismissPullReviewOptions )
826
- dismissReview (ctx , opts .Message , true )
826
+ dismissReview (ctx , opts .Message , true , opts . Priors )
827
827
}
828
828
829
829
// UnDismissPullReview cancel to dismiss a review for a pull request
@@ -863,10 +863,10 @@ func UnDismissPullReview(ctx *context.APIContext) {
863
863
// "$ref": "#/responses/forbidden"
864
864
// "422":
865
865
// "$ref": "#/responses/validationError"
866
- dismissReview (ctx , "" , false )
866
+ dismissReview (ctx , "" , false , false )
867
867
}
868
868
869
- func dismissReview (ctx * context.APIContext , msg string , isDismiss bool ) {
869
+ func dismissReview (ctx * context.APIContext , msg string , isDismiss , dismissPriors bool ) {
870
870
if ! ctx .Repo .IsAdmin () {
871
871
ctx .Error (http .StatusForbidden , "" , "Must be repo admin" )
872
872
return
@@ -886,7 +886,7 @@ func dismissReview(ctx *context.APIContext, msg string, isDismiss bool) {
886
886
return
887
887
}
888
888
889
- _ , err := pull_service .DismissReview (ctx , review .ID , ctx .Repo .Repository .ID , msg , ctx .Doer , isDismiss )
889
+ _ , err := pull_service .DismissReview (ctx , review .ID , ctx .Repo .Repository .ID , msg , ctx .Doer , isDismiss , dismissPriors )
890
890
if err != nil {
891
891
ctx .Error (http .StatusInternalServerError , "pull_service.DismissReview" , err )
892
892
return
0 commit comments