Do not make reviewer update request if there are no reviewer changes (#7730)

This commit is contained in:
Sam Coe 2023-07-24 10:16:45 -07:00 committed by GitHub
parent ad283cff72
commit f5d581d363
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,