From dc214f031f25631ae407ff62accbb320e3653334 Mon Sep 17 00:00:00 2001 From: Lily Brown Date: Mon, 4 Nov 2024 14:30:40 -0800 Subject: [PATCH] Allow merge state to be UNKNOWN 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. stack-info: PR: https://github.com/modularml/stack-pr/pull/49, branch: AmaranthineCodices/stack/1 --- src/stack_pr/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stack_pr/cli.py b/src/stack_pr/cli.py index 0e7b83e..26838c0 100755 --- a/src/stack_pr/cli.py +++ b/src/stack_pr/cli.py @@ -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