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:
2026-11-27 16:51:50 +01:00
parent afc9ee1653
commit 6700def9c8
4 changed files with 23 additions and 10 deletions
+3 -1
View File
@@ -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"]: