You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Add a Merge Queue Timings query #866
The GitHub data source can show workflow runs and individual Check Runs for a git ref (see #802), but neither measures how long a pull request spends in GitHub's merge queue. A workflow start or end timestamp cannot substitute for queue entry or exit, especially when a pull request is removed and re-queued.
How to reproduce
In Grafana Explore, select the GitHub data source and a repository using GitHub's native merge queue (for example, github/docs).
Look for a way to chart time spent in the queue by pull request or calculate a percentile across attempts. Workflow Runs and Check Runs expose run/check timing, but not queue entry and exit.
Compare with github/docs#46973: its GitHub GraphQL timeline reports entry at 2026-11-17T08:45:01Z and removal with reason merged at 2026-11-17T08:50:56Z (355 seconds).
Environment: GitHub.com and the GitHub data source at upstream main (7e74934). The API example was verified against GitHub.com.
Proposal
Add a Merge Queue Timings query backed by GitHub's pull request timeline (AddedToMergeQueueEvent and RemovedFromMergeQueueEvent). Return one row per attempt, with repository, pull request number and link, enqueue and exit timestamps, exit reason, and duration in seconds. Grafana can then calculate percentiles or group by exit reason without conflating queue time with check runtime.
Acceptance criteria
A re-queued PR produces separate rows, including for merge and non-merge exits.
Active attempts have no exit time or finalized duration; no queue history returns no rows.
Paginate both PR discovery and queue history. Document how the Grafana time range selects PRs and show how to aggregate duration in a panel.
Existing Pull Requests, Check Runs, and Workflow Runs queries remain unchanged. Per-PR check aggregation and merge-group check breakdowns are out of scope for this first query.
Activity
feat: add a Merge Queue Timings query