modularml / stack-pr

A tool for working with stacked PRs on github.
Other
299 stars 11 forks source link

Check that the bottom PR is mergeable #20

Closed AmaranthineCodices closed 3 months ago

AmaranthineCodices commented 3 months ago

GitHub lets you check if a PR is actually mergeable via the gh CLI by retrieving the mergeStateStatus field. This field has a bunch of values (see the [API documentation][1] linked below), but the one we care about is CLEAN, indicating that the PR has no merge conflicts and has passed PR checks.

I'd like to eventually add this information to stack-pr view, but it will require some extra piping, and will slow down the command due to the extra network request.

1: https://docs.github.com/en/graphql/reference/enums#mergestatestatus