Answer prose round 2: 0 🔴, 1 🟡 (0 misread); the shown_pull docstring, the help's last clause, the review_comment docstring and a test name
This commit is contained in:
@@ -45,7 +45,7 @@ push pushes the branch, setting its upstream. Where its pull request is open
|
||||
epic's working branch, it then asks for a review as ready does. Use it for each push
|
||||
after ready there, and wait for that review as for any other. Before it asks, it waits up
|
||||
to a minute for the forge to show the pushed commit as the head of the branch's open
|
||||
pull request, and fails, naming the pull request, where the forge never does.
|
||||
pull request, and fails, naming the pull request, where the forge still doesn't after that.
|
||||
merge merges the pull request in its turn: the chunks of one project on this machine take
|
||||
turns, one at a time. Run it in the background. In its turn it:
|
||||
1. fetches origin and merges its default branch into the branch, as sync does;
|
||||
@@ -389,7 +389,7 @@ def pushed(run: Run, config: Config, sleep: typing.Callable[[float], None]) -> s
|
||||
|
||||
|
||||
def shown_pull(forge: Forge, branch: str, head: str, run: Run, sleep: typing.Callable[[float], None]) -> str | None | Failure:
|
||||
"""The number of branch's open pull request at head, just pushed. Right after a push the forge may still list the pull request at an older head, so this polls up to PUSH_SECONDS while it lists one at another head, and then fails naming it. None where no pull request from branch is open: `push` before `open` is normal."""
|
||||
"""The number of branch's open pull request at head, just pushed. Right after a push the forge may still list that pull request at an older head. While it does, this polls for up to PUSH_SECONDS, then returns a Failure naming the pull request. None where no pull request from branch is open: `push` before `open` is normal."""
|
||||
other = None
|
||||
for waited in range(0, PUSH_SECONDS + 1, PUSH_POLL_SECONDS):
|
||||
number = open_pull(forge, branch, head, run)
|
||||
@@ -417,7 +417,7 @@ def comment_on(forge: Forge, number: str, comment: str, run: Run) -> str | Failu
|
||||
|
||||
|
||||
def review_comment(run: Run, config: Config) -> str | None | Failure:
|
||||
"""The config's `review-request-comment` that a pull request from the branch checked out is owed, where it goes into an epic's working branch: a forge's auto-reviewer may review only pull requests into the default branch unless asked. None where the config names none or the pull request goes into the default branch."""
|
||||
"""The config's `review-request-comment`, where the pull request from the branch checked out goes into an epic's working branch: a forge's auto-reviewer may review only pull requests into the default branch unless asked. None where the config names none or the pull request goes into the default branch."""
|
||||
branch = answers(run, ["symbolic-ref", "--short", "HEAD"])
|
||||
base = branch if isinstance(branch, Failure) else base_of(branch[0], run)
|
||||
if isinstance(base, Failure):
|
||||
|
||||
@@ -1215,7 +1215,7 @@ class EpicBranch(unittest.TestCase):
|
||||
self.assertEqual(step(["push"], checkout, checkout.config, sleep=slept.append), "Pushed item-7, and asked for a review of pull request #12 with “@reviewer review”.")
|
||||
self.assertEqual(slept, [5, 5])
|
||||
|
||||
def test_push_fails_naming_the_pull_request_where_the_forge_never_shows_the_new_head(self):
|
||||
def test_push_fails_naming_the_pull_request_where_the_forge_still_shows_the_old_head_after_a_minute(self):
|
||||
checkout, slept = self.checkout(), []
|
||||
checkout.listed_heads = [OLD]
|
||||
done = step(["push"], checkout, checkout.config, sleep=slept.append)
|
||||
|
||||
Reference in New Issue
Block a user