Paginate API calls in Documentation Team Approval check - #39409
Open
hestonhoffman wants to merge 1 commit into
Open
Paginate API calls in Documentation Team Approval check#39409hestonhoffman wants to merge 1 commit into
hestonhoffman wants to merge 1 commit into
Conversation
listReviews was called without pagination, so it only read the first 30 reviews. On PRs with many review rounds, team approvals beyond the first page were invisible and the check published a failing "Documentation Team Approval" status despite a valid approval. Also paginate the team member lookups and raise the page size on requested reviewers, so the same truncation cannot recur as teams grow. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Paginates the GitHub API list calls in the "Documentation Team Approval" workflow.
We've been seeing this more frequently recently and a fix was proposed in #documentation.
pulls.listReviewswas called without pagination, so it read only the first 30 reviews. On a PR with more reviews than that, a documentation-team approval past the cutoff was invisible, and the workflow published a failing required status on an approved PR.Also paginates the two
teams.listMembersInOrgcalls and raises the page size onlistRequestedReviewers, which have the same defect but are under the limit today. I looked into rate limiting and this shouldn't have much impact.