Finding which PRs have been taken out of the Merge Queue due to failed status checks

Featured image for sharing metadata for article

In the Renovate project, we use the Merge Queue to merge PRs. If a PR fails its status checks, it will be pulled out of the Merge Queue, and a maintainer will need to re-queue it, if it is a transient error.

For those of you unaware, GitHub are having a pretty hard time recently with outages, which means that we're seeing an increase in the number of PRs being pulled out of the Merge Queue due to transient errors due to GitHub's instability (and in rare cases, due to flakiness in our test suite).

For a number of these PRs, they're dependency updates that Renovate raises (:yo_dawg:) which means that a maintainer doesn't necessarily see they're unmerged.

If we want to find out which PRs are approved, but not merged due to the merge queue un-queuing them, we can use the following GraphQL query:

# via Claude Sonnet 5
$ gh api graphql -f query='query {
  search(query: "repo:renovatebot/renovate is:pr is:open review:approved", type: ISSUE, first: 50) {
    nodes {
      ... on PullRequest {
        number
        title
        reviewDecision
        timelineItems(itemTypes: [REMOVED_FROM_MERGE_QUEUE_EVENT], first: 5) {
          nodes {
            ... on RemovedFromMergeQueueEvent {
              createdAt
              reason
            }
          }
        }
      }
    }
  }
}'
{
  "data": {
    "search": {
      "nodes": [
        {
          "number": 45225,
          "reviewDecision": "APPROVED",
          "timelineItems": {
            "nodes": []
          },
          "title": "chore(deps): update dependency @biomejs/biome to v2.5.7 (main)"
        },
        {
          "number": 45223,
          "reviewDecision": "APPROVED",
          "timelineItems": {
            "nodes": [
              {
                "createdAt": "2026-08-11T13:26:04Z",
                "reason": "failed_checks"
              }
            ]
          },
          "title": "fix(deps): update ghcr.io/renovatebot/base-image docker tag to v13.84.2 (main)"
        },
        {
          "number": 44971,
          "reviewDecision": "APPROVED",
          "timelineItems": {
            "nodes": []
          },
          "title": "fix(manager/mix): run mix commands from the lock file's directory"
        }
      ]
    }
  }
}

In this case, we can see that PR 45223 was taken off the Merge Queue and needs to be merged.

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

#blogumentation #github.

πŸ€– Content in this blog post (prose or code snippets) includes code derived from the following LLMs:

  • claude:sonnet-5

This post was filed under articles.

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.