From f5d581d3639bc8d30ad32d8e17a7c6a1fcfad463 Mon Sep 17 00:00:00 2001 From: Sam Coe Date: Mon, 24 Jul 2023 10:16:45 -0700 Subject: [PATCH] Do not make reviewer update request if there are no reviewer changes (#7730) --- pkg/cmd/pr/edit/edit.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/cmd/pr/edit/edit.go b/pkg/cmd/pr/edit/edit.go index 915eba657..bab7a26d4 100644 --- a/pkg/cmd/pr/edit/edit.go +++ b/pkg/cmd/pr/edit/edit.go @@ -260,6 +260,10 @@ func updatePullRequestReviews(httpClient *http.Client, repo ghrepo.Interface, id if err != nil { return err } + if (userIds == nil || len(*userIds) == 0) && + (teamIds == nil || len(*teamIds) == 0) { + return nil + } union := githubv4.Boolean(false) reviewsRequestParams := githubv4.RequestReviewsInput{ PullRequestID: id,