Finish item 378: name a Jira plan's chunks by the issue key through the branch and title templates
CI / tests (pull_request) Successful in 2m7s
CI / tests (pull_request) Successful in 2m7s
This commit is contained in:
@@ -53,6 +53,9 @@ character; left out, it is "{summary}". `branch` holds {id} once, among letters,
|
||||
A title must fit its template only on a branch that fits `branch`. On any other branch, as for a
|
||||
chunk with no plan item, such as a release review, it may be the bare summary. A tool that reads
|
||||
a title for its summary tries `commit-title`, then `pull-request-title`, then takes the title whole.
|
||||
For a Jira plan the item's ID is the issue's number, so a project key such as ABC gives the ticket-style names with
|
||||
`branch = "ABC-{id}"`, `commit-title = "ABC-{id} - {summary}"` and `pull-request-title = "ABC-{id} - {summary}"`:
|
||||
the chunk of ABC-123 is on the branch ABC-123, in the worktree <checkout>-ABC-123, and its commits read "ABC-123 - …".
|
||||
`project-config <setting>` prints each one's value, and the full listing shows it only where the
|
||||
config changes it from what it is when left out.
|
||||
|
||||
|
||||
@@ -35,6 +35,13 @@ class TitleTest(unittest.TestCase):
|
||||
self.assertEqual(branch_of("item-{id}", 357), "item-357")
|
||||
self.assertEqual(branch_of("feature/PAY-{id}", 357), "feature/PAY-357")
|
||||
|
||||
def test_the_ticket_style_templates_of_a_jira_plan_name_the_branch_and_title_by_the_issue_key(self) -> None:
|
||||
self.assertIsNone(branch_fault("ABC-{id}"))
|
||||
self.assertIsNone(title_fault("ABC-{id} - {summary}"))
|
||||
self.assertEqual(branch_of("ABC-{id}", 123), "ABC-123")
|
||||
self.assertTrue(branch_fits("ABC-{id}", "ABC-123"))
|
||||
self.assertEqual(summary_of("ABC-{id} - {summary}", "ABC-123 - Regression tests for GET /v4/clients"), "Regression tests for GET /v4/clients")
|
||||
|
||||
def test_reads_the_summary_out_of_a_title_that_fits(self) -> None:
|
||||
cases = {
|
||||
("{summary}", "Answer prose round 1: 0 🔴, 0 🟡 (0 misread)"): "Answer prose round 1: 0 🔴, 0 🟡 (0 misread)",
|
||||
|
||||
Reference in New Issue
Block a user