GitHub API

GitHub API's /stats/contributors Stuck on 202: Impact on Git Analysis Tools & Dev Metrics

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.

The Core Problem: A Persistent 202

The standard behavior for the /stats/contributors endpoint is a two-step process: an initial request returns an HTTP 202 (Accepted) status, indicating that the statistics are being computed in the background. Subsequent requests, after the computation is complete, should return an HTTP 200 (OK) status along with the requested contributor data. However, as reported by jstrieb and confirmed by others, this endpoint now consistently returns 202 forever, never progressing to a 200. This effectively renders the endpoint unusable for fetching live contributor data.

To replicate the issue, a simple loop polling the API demonstrates the persistent 202 status:

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

This script, whether run with a fixed delay or exponential backoff, never receives a 200 OK response, confirming the regression.

Why This Matters for Engineering Leadership

For dev team members, product/project managers, delivery managers, and CTOs, the reliability of APIs like GitHub's /stats/contributors is paramount. This endpoint provides critical development metrics examples, such as lines of code contributed, commit frequency, and overall team activity. When this data stream breaks, it directly impacts:

  • Productivity Monitoring: Leaders lose visibility into individual and team contributions, making it harder to track progress and identify bottlenecks.
  • Performance Reporting: Automated agile KPI dashboard systems that rely on this data become inaccurate or entirely non-functional.
  • Tooling Efficacy: Many git analysis tools and custom scripts built to enhance engineering workflows are rendered useless, forcing manual workarounds or data gaps.
  • Strategic Planning: Without reliable historical data, strategic decisions based on past team performance become speculative.

The lack of official communication regarding this regression further complicates matters, leaving teams scrambling for solutions without clear guidance from GitHub.

Illustration of a software development dashboard with a broken section for contributor statistics, highlighting the impact on agile KPI dashboards.
Illustration of a software development dashboard with a broken section for contributor statistics, highlighting the impact on agile KPI dashboards.

Workaround 1: The Undocumented Endpoint

As the original poster and other community members discovered, GitHub's own contributor pages continue to display this data, albeit by calling an undocumented internal endpoint: https://github.com/{owner}/{repo}/graphs/contributors-data. This endpoint mirrors the original API's behavior of returning a 202 initially, then a 200 with data.

While not officially supported and subject to change without notice, this endpoint provides a temporary lifeline for those desperate to retrieve the 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

Teams adopting this workaround should proceed with caution, understanding the inherent risks of relying on an unofficial API.

Workaround 2: Leveraging GraphQL for Deeper Insights

For those seeking a more robust and official, albeit more complex, alternative, migrating to GitHub's GraphQL API offers a powerful solution. As demonstrated by dparker1005 with their GitPacks application, fetching raw commit history via GraphQL allows developers to compute contributor statistics client-side.

This approach requires more effort in data processing but provides greater control and resilience against specific REST API endpoint regressions. It ensures that critical development metrics examples can still be derived, even if a particular REST endpoint falters. While it's a heavier lift, it aligns with a strategy of building more resilient git analysis tools that are less susceptible to single-point-of-failure API issues.

Illustration comparing a blocked REST API data flow with a successful GraphQL data flow for retrieving development metrics.
Illustration comparing a blocked REST API data flow with a successful GraphQL data flow for retrieving development metrics.

Beyond the Fix: The Importance of API Reliability and Communication

This incident underscores a critical aspect of modern software development: the profound reliance on third-party APIs. For organizations building agile KPI dashboard systems, custom tooling, or public-facing applications, API reliability is not just a convenience—it's a foundational requirement for productivity and delivery.

When a core API endpoint experiences a regression without clear communication, it creates significant disruption. This highlights the need for:

  • Robust API Change Management: Clear communication channels for deprecations, breaking changes, and known regressions.
  • Comprehensive Documentation: Up-to-date API documentation that reflects current behavior.
  • Prompt Bug Resolution: Swift action on critical API failures that impact a wide developer base.

We encourage all affected users to open support tickets at https://support.github.com/contact to help escalate the fix and ensure GitHub is aware of the widespread impact.

Conclusion

The ongoing issue with GitHub's /repos/{owner}/{repo}/stats/contributors endpoint being stuck on a perpetual 202 is a significant roadblock for developers and engineering leaders. It disrupts the flow of crucial development metrics examples, impacts git analysis tools, and undermines the reliability of agile KPI dashboard systems. While temporary workarounds exist—from using undocumented endpoints to leveraging GraphQL—a permanent fix and improved communication from GitHub are essential for maintaining developer trust and enabling efficient software delivery. As always, proactive monitoring and a diversified approach to data sourcing can help mitigate such risks in an API-driven world.

Share:

|

Dashboards, alerts, and review-ready summaries built on your GitHub activity.

 Install GitHub App to Start
Dashboard with engineering activity trends