Rename do-epic to build-epic, with no alias, and its config folder with it
CI / tests (pull_request) Successful in 4m34s
CI / tests (pull_request) Successful in 4m34s
This commit is contained in:
@@ -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))]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user