Answer prose round 1: 0 🔴, 3 🟡 (0 misread); the Jira sentence moves after the finish sentence, the help and error text name Jira, and the test names lose the negation
This commit is contained in:
@@ -30,7 +30,8 @@ merge merges the pull request in its turn: the chunks of one project on this
|
||||
1. fetches origin and merges its default branch into the branch, as sync does;
|
||||
2. finishes each plan item a --finish names with `todo-item finish`, passing on
|
||||
--changelog or --no-changelog (a Jira plan takes no --changelog, as todo-item says),
|
||||
and commits what that changed in the plan and the changelog, so both change only at merge time, on top of every chunk merged before;
|
||||
and commits what that changed in the plan and the changelog, so both change only
|
||||
at merge time, on top of every chunk merged before;
|
||||
3. pushes, also where step 2 failed after step 1 brought changes in;
|
||||
4. waits for the pull request's checks, and those origin's default branch requires, to
|
||||
pass on the head; where no check reports within a minute, it takes the pull request
|
||||
|
||||
@@ -63,7 +63,9 @@ mistake. It prints `Finished item <ID> in <plan>.` It doesn't write anything whi
|
||||
finish <ID> --no-changelog also drops an item no chunk built.
|
||||
In a Jira epic, finish doesn't remove anything: it moves the item's issue by the transition, and to
|
||||
the status, that the config's `jira-finish-transition` and `jira-finish-status` name, as
|
||||
`project-config --help` shows. It needs neither --changelog nor --no-changelog (it accepts --no-changelog), never reads the changelog, and refuses --changelog, since the issues' history is the changelog. docs/decisions.md isn't checked.
|
||||
`project-config --help` shows. The issues' history is the changelog, so finish there needs
|
||||
neither --changelog nor --no-changelog, and never reads the changelog. It refuses --changelog and
|
||||
accepts --no-changelog. docs/decisions.md isn't checked.
|
||||
It fails, moving no issue, where the config sets neither, where the issue has no such transition
|
||||
from its present status, or where the transition leads to another status or to one Jira doesn't
|
||||
count as done. An issue that no chunk built is dropped in Jira, not with finish, which would mark it done.
|
||||
@@ -222,7 +224,7 @@ def finish(args: argparse.Namespace, plan: PlanStore, changelog: RecordStore | N
|
||||
"""Finish item args.id in plan. changelog is where its bullet goes, or None where the plan keeps no changelog."""
|
||||
if changelog is None:
|
||||
if args.changelog is not None:
|
||||
return Failure("not finished: this plan keeps no changelog, since the issues' history is the changelog; drop --changelog")
|
||||
return Failure("not finished: the plan is a Jira epic, so the issues' history is the changelog; drop --changelog")
|
||||
return reported(plan.finish(args.id), "not finished", lambda written: f"Finished item {written.id} in {plan.label}.")
|
||||
held = changelog.held()
|
||||
if isinstance(held, Failure):
|
||||
|
||||
@@ -278,7 +278,7 @@ class FinishInJira(TodoItem):
|
||||
patched.start()
|
||||
self.addCleanup(patched.stop)
|
||||
|
||||
def test_finishes_without_either_flag_and_leaves_a_changelog_that_exists_alone(self):
|
||||
def test_finishes_without_either_flag_and_doesnt_touch_the_changelog(self):
|
||||
self.changelog.write_text(CHANGELOG)
|
||||
self.assertEqual(self.run_main("finish", "3"), (0, "Finished item 3 in the plan in memory.\n", ""))
|
||||
self.assertEqual((self.plan.rows, self.changelog.read_text()), ({}, CHANGELOG))
|
||||
@@ -288,7 +288,7 @@ class FinishInJira(TodoItem):
|
||||
self.assertEqual(self.run_main("finish", "3", "--no-changelog"), (0, "Finished item 3 in the plan in memory.\n", ""))
|
||||
self.assertEqual(self.changelog.read_text(), CHANGELOG)
|
||||
|
||||
def test_refuses_a_bullet_writing_nothing_and_says_the_issues_history_is_the_changelog(self):
|
||||
def test_refuses_a_bullet_and_says_the_issues_history_is_the_changelog(self):
|
||||
self.changelog.write_text(CHANGELOG)
|
||||
code, out, err = self.run_main("finish", "3", "--changelog", "Runs are fast.")
|
||||
self.assertEqual((code, out), (1, ""))
|
||||
|
||||
Reference in New Issue
Block a user