Answer stability round 1: 0 🔴, 1 🟡 (0 misread); read pages until an empty or repeated one, and reword the paging prose
This commit is contained in:
@@ -193,7 +193,9 @@ def merge(number, guard):
|
||||
git("update-ref", "refs/heads/main", head)
|
||||
pull(number)["state"] = "merged"
|
||||
opened = [found for found in state["pulls"] if found["state"] == "open"]
|
||||
if forge == "tea" and args == ["api", "repos/{owner}/{repo}/pulls?state=open&limit=50"]:
|
||||
if forge == "tea" and args == ["api", "repos/{owner}/{repo}/pulls?state=open&limit=50&page=2"]:
|
||||
print("[]")
|
||||
elif forge == "tea" and args == ["api", "repos/{owner}/{repo}/pulls?state=open&limit=50"]:
|
||||
repo = lambda found: {"full_name": "fork/r" if found["fork"] else "o/r"}
|
||||
print(json.dumps([{"number": found["number"], "head": {"ref": found["head"], "label": found["head"], "sha": sha(found), "repo": repo(found)}, "base": {"repo": {"full_name": "o/r"}}} for found in opened]))
|
||||
elif forge == "gh" and args[:3] == ["pr", "list", "--head"] and args[4:6] == ["--json", "number,headRefOid,isCrossRepository"]:
|
||||
|
||||
Reference in New Issue
Block a user