Skip to content

Commit

Permalink
chore: Add comment to explain removeReviewersRequest usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jan 23, 2025
1 parent 6b2e613 commit b657b08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions github/pulls_reviewers.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func (s *PullRequestsService) ListReviewers(ctx context.Context, owner, repo str
func (s *PullRequestsService) RemoveReviewers(ctx context.Context, owner, repo string, number int, reviewers ReviewersRequest) (*Response, error) {
// reviewers.Reviewers may be empty if the caller wants to remove teams, but not users. Unlike AddReviewers,
// "reviewers" is a required param here. Reference: https://github.com/google/go-github/issues/3336
// The type `removeReviewersRequest` is required because the struct tags are different from `ReviewersRequest`.
removeRequest := removeReviewersRequest(reviewers)

if removeRequest.Reviewers == nil {
Expand Down

0 comments on commit b657b08

Please sign in to comment.