From cfafa50546138900d5cb221057a78d6c8fb2b9f8 Mon Sep 17 00:00:00 2001 From: Steven Hinojosa Date: Sat, 12 Jul 2025 13:56:55 -0700 Subject: [PATCH] Fix contributor count pagination - add per_page=100 to contributors API call - Resolves issue where contributor counts were capped at 30 - Now fetches all contributors using proper pagination - SunPy should show 239 contributors instead of 30 --- src/pyosmeta/github_api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyosmeta/github_api.py b/src/pyosmeta/github_api.py index 1655bc3..9997fd1 100644 --- a/src/pyosmeta/github_api.py +++ b/src/pyosmeta/github_api.py @@ -234,7 +234,8 @@ def _get_contrib_count_rest(self, url: str) -> int | None: logged, and the method returns None. """ # https://api.github.com/repos/{owner}/{repo}/contributors - repo_contribs_url = f"https://api.github.com/repos/{url['owner']}/{url['repo_name']}/contributors" + # Add per_page=100 to get maximum contributors per page and reduce API calls + repo_contribs_url = f"https://api.github.com/repos/{url['owner']}/{url['repo_name']}/contributors?per_page=100" contributors = self._get_response_rest(repo_contribs_url) if not contributors: