List only the open pull requests from the item's branch, by number and URL, so no stranger's title reaches the worker's prompt
This commit is contained in:
@@ -42,8 +42,8 @@ TODO = """# todo
|
||||
Change `src/app.py`'s `run` and the files under `src`, not `gone.py`.
|
||||
"""
|
||||
CHANGELOG = "# Changelog\n\n## Unreleased\n\n- One.\n - A nested line.\n- Two.\n\n## 0.1.0\n\n- Old.\n"
|
||||
# Prints its arguments, then two open pull requests, as `tea pulls list --output tsv` does.
|
||||
FAKE_TEA = "#!/bin/sh\necho \"tea $*\"\nprintf 'index\\ttitle\\thead\\tstate\\n12\\tWIP: the next thing\\titem-3\\topen\\n'\n"
|
||||
# Two open pull requests, as `tea pulls list --fields index,head,url --output tsv` prints them; anything else exits 1.
|
||||
FAKE_TEA = "#!/bin/sh\n[ \"$*\" = 'pulls list --fields index,head,url --output tsv' ] || exit 1\nprintf 'index\\thead\\turl\\n12\\titem-3\\thttps://forge/pulls/12\\n13\\tother\\thttps://forge/pulls/13\\n'\n"
|
||||
|
||||
|
||||
class Repo:
|
||||
@@ -104,8 +104,7 @@ class ChunkPreflightTool(unittest.TestCase):
|
||||
"- `src/app.py`: 3 lines",
|
||||
"- `src`: 1 file",
|
||||
"Change `src/app.py`'s `run` and the files under `src`, not `gone.py`.",
|
||||
"tea pulls list --fields index,title,head,state --output tsv",
|
||||
"12\tWIP: the next thing\titem-3\topen",
|
||||
"- Open pull requests from item-3: #12 https://forge/pulls/12\n",
|
||||
"`rank_todo.py --check todo.md` exited 0",
|
||||
"`larv-review needs-scoring-run 3` exited 0",
|
||||
"`reading-cost` exited 0",
|
||||
|
||||
Reference in New Issue
Block a user