Prior to this PR, reviewers were validated by first fetching all teams and users, and then checking membership in that result. This suffers from a few issues:
it was broken since it seemed to only fetch one page, not all pages. This can't work with any significant number of users or teams in an organization.
it is inefficient
fetching the full list is not necessary
there was a 1+n style query, where the users name would be looked for each user in the list.
This PR modifies reviewer validation by fetching only the users/teams specified in the commit.
Prior to this PR, reviewers were validated by first fetching all teams and users, and then checking membership in that result. This suffers from a few issues:
This PR modifies reviewer validation by fetching only the users/teams specified in the commit.