GitHub API Bug: A Critical Hit to Developer Performance Metrics

In the world of software development, accurate data is the bedrock of effective decision-making, especially when it comes to understanding and improving developer performance. Teams and leaders frequently rely on API data from platforms like GitHub to populate their software development KPI dashboards and derive meaningful developer performance metrics. However, a recent community discussion on GitHub has brought to light significant discrepancies in how Pull Request events are reported via the public user activity API, raising concerns about the reliability of these crucial data points.

Distorted data on a developer dashboard, symbolizing inaccurate performance metrics.
Distorted data on a developer dashboard, symbolizing inaccurate performance metrics.

Unpacking the GitHub PullRequestEvent Discrepancies

The discussion, initiated by user mootari, detailed a critical bug where the /users/USERNAME/events/public API endpoint provides incorrect information for PullRequestEvent types. Initially, the bug was observed when a pull request, previously moved back to a draft state, was subsequently closed. The API would return an entry for the draft change, but its payload would erroneously reflect a close action. An example excerpt provided:

{id: "10666383780", type: "DeleteEvent", created_at: "2026-04-16T15:11:08Z", /* ... */},
{id: "8491046530", type: "PullRequestEvent", created_at: "2025-01-10T11:04:23Z", payload: {action: "closed", /* ... */}, /* ... */}
{id: "10634817062", type: "PushEvent", created_at: "2026-04-15T22:43:34Z", /* ... */},

The issue quickly expanded beyond draft PRs. Mootari's subsequent observations revealed that this misrepresentation affects any pull request that gets closed rather than merged. More critically, the created_at timestamp for these events often didn't align with the actual closure date, instead matching earlier activities like the last comment. This temporal inaccuracy alone can severely distort any time-based performance measurement metrics.

Adding another layer of complexity, the discussion highlighted a misattribution problem: merges were incorrectly attributed to the user who created the PR, rather than the maintainer who actually performed the merge. This directly impacts the ability to accurately track individual contributions and responsibilities, making it challenging to derive precise developer performance metrics related to merging activity.

A confused Octocat observing a jumbled pull request workflow diagram, illustrating API event discrepancies.
A confused Octocat observing a jumbled pull request workflow diagram, illustrating API event discrepancies.

Why This Matters for Your Software Development KPI Dashboard

For organizations striving for data-driven insights, these API inaccuracies pose a significant challenge. A software development KPI dashboard built on such flawed data would present a skewed picture of team activity and individual contributions. Imagine trying to measure metrics like "time to close PR," "PR closure rate," or "merges per maintainer" when the underlying event data is inconsistent in action type, timestamp, and attribution. The reliability of any performance measurement metrics derived from this API becomes questionable, potentially leading to misguided decisions or an incomplete understanding of team dynamics.

Community's Role in Improving API Reliability

While GitHub's automated response acknowledged the feedback, the ongoing nature of the discussion underscores the importance of community vigilance. Such detailed reports from users like mootari are invaluable in identifying and rectifying issues that impact the broader developer ecosystem. Ensuring the accuracy of foundational API data is paramount for anyone trying to build robust developer performance metrics and reliable software development KPI dashboards.

As developers, our collective participation in these discussions helps shape the future of the tools we rely on daily. Accurate data empowers us to build better, measure smarter, and continuously improve our development processes.

|

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

 Install GitHub App to Start
Dashboard with engineering activity trends