Rename do-epic to build-epic, with no alias, and its config folder with it
CI / tests (pull_request) Successful in 4m34s

This commit is contained in:
2026-12-03 22:35:13 +01:00
parent e6b025caaa
commit cded873730
100 changed files with 919 additions and 910 deletions
+3 -3
View File
@@ -6,8 +6,8 @@ Run inside a checkout, or a worktree of one. It finds the config that names the
~/.config/build-release/<key>/config.toml, and prints each setting and its absolute path, as in
`plan: /home/me/code/acme/todo.md`. Given a setting, it prints only that setting's path.
`~/.config/build-release/do-epic/` holds do-epic's machine-wide settings, not a project's. It needs no `checkout`,
and project-config doesn't read anything from it, so no project may use `do-epic` as its key.
`~/.config/build-release/build-epic/` holds build-epic's machine-wide settings, not a project's. It needs no `checkout`,
and project-config doesn't read anything from it, so no project may use `build-epic` as its key.
The config is TOML. `checkout` names the project's main checkout, and every setting in the example below is a path:
"checkout:<path>" inside the checkout, "folder:<path>" inside the config's own folder, or one that
@@ -111,7 +111,7 @@ prints chunk or human; the full listing shows the setting only where it is human
`epic-branch` is an optional setting: a template that names an epic's working branch, with {epic} for the
epic's key, such as `epic-branch = "{epic}"` or "epic/{epic}". The epic is the Jira epic `plan` names, or
under do-epic the epic it drives. Each chunk then
under build-epic the epic it drives. Each chunk then
branches off that branch, and `chunk-pr` opens its pull request into it and merges it there without a
person, whatever `merge` and `wait-for-approval` say: those guard the default branch. `chunk-preflight`
makes the branch on origin off the default branch, or merges the default branch into it, and stops where
+7 -7
View File
@@ -18,8 +18,8 @@ from project_config import templates
from plan.ranking import variables
CONFIG = "config.toml"
# The key of do-epic's machine-wide settings: the folder's config.toml has no `checkout`, so no project may use the key.
DO_EPIC = "do-epic"
# The key of build-epic's machine-wide settings: the folder's config.toml has no `checkout`, so no project may use the key.
BUILD_EPIC = "build-epic"
# A Jira Cloud or Confluence Cloud site's address: only https, so the credentials are never sent in the clear.
SITE = r"https://[A-Za-z0-9.-]+(?::[0-9]+)?"
# Every path a project sets, by its role. Three readers, seated as the human who writes the config, picked the spelling from four candidates. They picked role names over file names, which a client's project doesn't share.
@@ -70,7 +70,7 @@ JIRA_FINISH = (JIRA_FINISH_TRANSITION, JIRA_FINISH_STATUS)
JIRA_SCORE_FORMULA = "jira-score-formula"
JIRA_SCORE_BAR = "jira-score-bar"
JIRA_SCORE = (JIRA_SCORE_FORMULA, JIRA_SCORE_BAR)
# The issue types that `todo-item add` files an item as and do-epic files a finding as, and do-epic files a release review as; only do-epic's config reads the review type.
# The issue types that `todo-item add` files an item as and build-epic files a finding as, and build-epic files a release review as; only build-epic's config reads the review type.
JIRA_FINDING_TYPE = "jira-finding-type"
JIRA_REVIEW_TYPE = "jira-review-type"
# Jira Software's project templates ship Task, but a project such as TW may lack it.
@@ -438,13 +438,13 @@ def by_name(name: str, home: pathlib.Path, env: Mapping[str, str]) -> ProjectCon
def configs(home: pathlib.Path, env: Mapping[str, str]) -> list[pathlib.Path]:
"""Every project's config file in the config folder, in key order. do-epic's machine-wide config is not a project's."""
return sorted(file for file in config_folder(env, home).glob(f"*/{CONFIG}") if file.parent.name != DO_EPIC)
"""Every project's config file in the config folder, in key order. build-epic's machine-wide config is not a project's."""
return sorted(file for file in config_folder(env, home).glob(f"*/{CONFIG}") if file.parent.name != BUILD_EPIC)
def env_files(home: pathlib.Path, env: Mapping[str, str]) -> list[pathlib.Path]:
"""Every config's env-file, do-epic's included. Each is read without the checks load makes, so a config that fails them still keeps its credentials guarded. A config that can't be read doesn't name one."""
values = [parsed(file) for file in (*configs(home, env), config_folder(env, home) / DO_EPIC / CONFIG)]
"""Every config's env-file, build-epic's included. Each is read without the checks load makes, so a config that fails them still keeps its credentials guarded. A config that can't be read doesn't name one."""
values = [parsed(file) for file in (*configs(home, env), config_folder(env, home) / BUILD_EPIC / CONFIG)]
return [path for found in values if not isinstance(found, Failure) and (path := anywhere(found.get(ENV_FILE), home))]
+7 -7
View File
@@ -54,8 +54,8 @@ class LoadTest(ConfigCase):
self.assertEqual(found.paths["standards"], self.home / ".claude" / "skills" / "larv-review" / "standards")
self.assertEqual(tuple(found.paths), SETTINGS)
def test_the_do_epic_folder_is_no_projects_config_so_it_needs_no_checkout(self) -> None:
self.write("do-epic", 'jira-url = "https://acme.atlassian.net"\n')
def test_the_build_epic_folder_is_no_projects_config_so_it_needs_no_checkout(self) -> None:
self.write("build-epic", 'jira-url = "https://acme.atlassian.net"\n')
self.write("acme", CLIENT)
found = load(self.checkout, self.checkout, self.home, {})
assert isinstance(found, ProjectConfig), found
@@ -639,8 +639,8 @@ class HeldTest(ConfigCase):
(elsewhere / "config.toml").write_text(CLIENT, encoding="utf-8")
self.assertIsNone(held(elsewhere, self.home, {}), "a config.toml outside ~/.config/build-release/")
def test_the_do_epic_folder_holds_no_projects_config(self) -> None:
folder = self.write("do-epic", CLIENT)
def test_the_build_epic_folder_holds_no_projects_config(self) -> None:
folder = self.write("build-epic", CLIENT)
self.assertIsNone(held(folder, self.home, {}))
def test_a_configs_folder_reached_through_a_symlink_holds_its_config(self) -> None:
@@ -663,7 +663,7 @@ class ByNameTest(ConfigCase):
self.write("acme", CLIENT)
self.assertIsNone(by_name("billing", self.home, {}), "a part of a name is not the name")
self.assertIsNone(by_name("acme", self.home, {}), "a config's key is not a repo's name")
self.assertIsNone(by_name("do-epic", self.home, {}))
self.assertIsNone(by_name("build-epic", self.home, {}))
def test_fails_where_two_configs_name_a_checkout_of_that_name(self) -> None:
self.write("acme", CLIENT)
@@ -686,8 +686,8 @@ class EnvFilesTest(ConfigCase):
self.write("none", CLIENT)
self.assertEqual(env_files(self.home, {}), [self.home / "acme.env", pathlib.Path("/srv/other.env")])
def test_lists_do_epics_env_file_though_its_config_names_no_checkout(self) -> None:
self.write("do-epic", 'env-file = "~/jira.env"\n')
def test_lists_build_epics_env_file_though_its_config_names_no_checkout(self) -> None:
self.write("build-epic", 'env-file = "~/jira.env"\n')
self.assertEqual(env_files(self.home, {}), [self.home / "jira.env"])