Skip to content

Commit

Permalink
Allow merge state to be UNKNOWN (#49)
Browse files Browse the repository at this point in the history
When validating whether a PR is mergeable on GitHub, sometimes the PR
will get stuck in an `UNKNOWN` merge state and block merging, even if
it's mergeable in the GitHub UI.
  • Loading branch information
AmaranthineCodices authored Nov 12, 2024
1 parent 18c305c commit efba3a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stack_pr/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def verify(st: List[StackEntry], check_base: bool = False):
raise RuntimeError

# The first entry on the stack needs to be actually mergeable on GitHub.
if check_base and index == 0 and d["mergeStateStatus"] != "CLEAN":
if check_base and index == 0 and d["mergeStateStatus"] != "CLEAN" and d["mergeStateStatus"] != "UNKNOWN":
error(ERROR_STACKINFO_PR_NOT_MERGEABLE.format(**locals()))
raise RuntimeError

Expand Down

0 comments on commit efba3a0

Please sign in to comment.