Filter open GitHub PRs that are out-of-date / up-to-date with the target branch?

Viewed 103

On a GitHub repo that has the Require branches to be up to date before merging branch protection rule enabled and that often has several open pull requests, PRs will frequently be merged in an order that requires more merge commits and CI runs than necessary.

Is there a way to quickly identify which open PRs are currently up-to-date with the base branch?


For example, with three approved open PRs:

  • PR_A, approved but not up-to-date with main, will need main merged into the A branch and another CI run before being merged into main
  • PR_B, similar to PR_A, will also need a merge from main & CI run
  • PR_C, approved and up-to-date with main, could be merged immediately with no extra commit or CI run.

If PR_A or PR_B are merged first, PR_C would become out-of-date, unnecessarily requiring a merge commit from main & a CI run.

What search syntax or automatic system would highlight PR_C as the PR that should be merged first?

0 Answers
Related