Clean up a do-epic chunk whose pull request merged without waiting for a running slot
CI / tests (pull_request) Successful in 5m24s
CI / tests (pull_request) Successful in 5m24s
This commit is contained in:
@@ -38,6 +38,8 @@ class Open:
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Unopened(Open):
|
||||
"""An Open whose worktree stands though no pull request is open at its head: one that was merged or closed, whose chunk still has its worktree to remove."""
|
||||
# The chunk's worktree.
|
||||
worktree: str
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
@@ -65,7 +67,7 @@ def gate(branch: str, checkout: str, at: typing.Callable[[str], Run], by_human:
|
||||
forge = forge_of(origin)
|
||||
pull = open_pull(forge, branch, head, run)
|
||||
if not isinstance(pull, str):
|
||||
return pull or Unopened(f"no pull request from origin's {branch} is open at {head[:12]}; it may be merged or closed already")
|
||||
return pull or Unopened(f"no pull request from origin's {branch} is open at {head[:12]}; it may be merged or closed already", worktree)
|
||||
decision = review_decision(forge, pull, head, run)
|
||||
if not isinstance(decision, str):
|
||||
return decision or Open(f"pull request #{pull} is a draft")
|
||||
|
||||
Reference in New Issue
Block a user