Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add PR number for paged pull requests #18

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: add PR number for paged pull requests
We found that when a PR has a large number of reviews, that the processing of
the pull request will fail because it finds the PR number to be null (see line
994). This is because the PR number is not included in the request for
subsequent pages.
  • Loading branch information
hicksjacobp committed May 4, 2022
commit 65aec4d01b03f4d94f3f023e0df2b86405199114
2 changes: 1 addition & 1 deletion gh-repo-stats
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ GetNextReviews() {
{
cat <<EOF
{
"query":"{ repository(owner:\"${OWNER}\" name:\"${REPO_NAME}\") { owner { login } name pullRequest(number:${PR_NUMBER}) { commits(first:1){ totalCount } timeline(first: 1) { totalCount } comments(first: 1) { totalCount } reviews(first: ${EXTRA_PAGE_SIZE}${REVIEW_NEXT_PAGE}) { totalCount pageInfo { hasNextPage endCursor } nodes { comments(first: 1) { totalCount } } } } }}"
"query":"{ repository(owner:\"${OWNER}\" name:\"${REPO_NAME}\") { owner { login } name pullRequest(number:${PR_NUMBER}) { number commits(first:1){ totalCount } timeline(first: 1) { totalCount } comments(first: 1) { totalCount } reviews(first: ${EXTRA_PAGE_SIZE}${REVIEW_NEXT_PAGE}) { totalCount pageInfo { hasNextPage endCursor } nodes { comments(first: 1) { totalCount } } } } }}"
}
EOF
}
Expand Down