GitHub API Hiccup: `/stats/contributors` Endpoint Stuck on 202, Impacting Git Analysis Tools
GitHub API Hiccup: `/stats/contributors` Endpoint Stuck on 202, Impacting Git Analysis Tools
A recent discussion in the GitHub Community has brought to light a significant regression affecting developers who rely on the platform's API for retrieving repository contributor statistics. The /repos/{owner}/{repo}/stats/contributors endpoint, crucial for many git analysis tools and development metrics examples, is currently misbehaving. Instead of eventually returning a 200 OK status with valuable data after an initial 202 Accepted, it remains indefinitely stuck on 202, preventing the successful retrieval of contributor statistics.
The original poster, jstrieb, highlighted that this issue began around April 12-13, 2026. This bug directly impacts projects that generate GitHub statistics images, breaking key metrics like lines of code changed for their users. The frustration is compounded by the fact that the data is visibly available on GitHub's own contributor pages, albeit through an undocumented internal endpoint, and there has been no official communication regarding this change or bug in the changelog or product roadmap.
Replicating the Issue
To demonstrate the persistent 202 status, jstrieb provided simple curl scripts. These scripts continuously poll the API endpoint, either with a fixed delay or exponential backoff, and consistently receive a 202 status code without ever progressing to a 200 OK.
Without exponential backoff:
while true; do curl \
--location \
--silent \
--write-out "%{
http_code}" \
--output /dev/null \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer [...]" \
-H "X-GitHub-Api-Version: 2026-03-10" \
'https://api.github.com/repos/jstrieb/github-stats/stats/contributors'
sleep 2
done
With exponential backoff:
SLEEP=2
while true; do curl \
--location \
--silent \
--write-out "%{
http_code}" \
--output /dev/null \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer [...]" \
-H "X-GitHub-Api-Version: 2026-03-10" \
'https://api.github.com/repos/jstrieb/github-stats/stats/contributors'
sleep "${SLEEP}"
SLEEP=$(( SLEEP * 2 ))
done
These scripts, when run for extended periods, never terminate with a 200 response, confirming the API's broken state.
Community-Driven Workarounds
While GitHub addresses this regression, the community has identified temporary solutions to continue gathering vital development metrics examples:
- Undocumented Internal Endpoint: Leocm123 confirmed the original poster's discovery of an internal GitHub endpoint used by their own contributor pages. This endpoint,
https://github.com/{owner}/{repo}/graphs/contributors-data, mirrors the expected 202 → 200 polling pattern and provides similar data. While not officially supported, it currently serves as the most direct alternative for those needing immediate access to this data.
# Poll until you get a 200
while true; do resp -s -o /tmp/stats.json -w "%{
http_code}" \
-H "Accept: application/json" \
https://github.com/{owner}/{repo}/graphs/contributors-data)
if [ "$response" = "200" ]; then
cat /tmp/stats.json
break
fi
sleep 3
done
- GraphQL for Commit History: Another robust workaround, implemented by dparker1005 for their GitPacks app, involves pulling commit history directly via GraphQL and calculating statistics client-side. This approach offers more control and resilience against specific API endpoint regressions, providing a reliable method for generating agile kpi dashboard data.
Developers are also encouraged to open support tickets at https://support.github.com/contact to help escalate the fix for this regression, ensuring the official API endpoint returns to its intended functionality.
Why This Matters for Developer Productivity
The reliability of core API endpoints is fundamental for developer productivity and the ecosystem of git analysis tools. When such endpoints fail without notice, it disrupts workflows, breaks applications, and forces developers to spend valuable time on workarounds rather than feature development. Accurate and accessible development metrics examples are vital for understanding project health, team contributions, and informing decisions for an effective agile kpi dashboard. GitHub's prompt attention to such regressions is crucial for maintaining trust and supporting the broader developer community.
