This commit is contained in:
+5
-3
@@ -106,10 +106,12 @@ def main(argv: list[str]) -> int:
|
||||
config = located(None, pathlib.Path.home())
|
||||
if isinstance(config, Failure):
|
||||
return fail(config)
|
||||
check, todo = args[0], args[1] or config.paths["plan"]
|
||||
if config.plan_file is None:
|
||||
return fail(Failure(f"rank_todo.py ranks a todo.md, and this checkout's config keeps the plan in Jira, whose backlog ranks it: {config.plan_label}"))
|
||||
check, todo = args[0], args[1] or config.plan_file
|
||||
# The goals, decisions and history are this checkout's project's, so another project's plan would be ranked by them.
|
||||
if todo.resolve() != config.paths["plan"].resolve():
|
||||
return fail(Failure(f"rank_todo.py: {todo} is not the plan this checkout's config names, {config.paths['plan'].resolve()}; run rank_todo.py in the checkout of the project whose plan it is"))
|
||||
if todo.resolve() != config.plan_file.resolve():
|
||||
return fail(Failure(f"rank_todo.py: {todo} is not the plan this checkout's config names, {config.plan_file.resolve()}; run rank_todo.py in the checkout of the project whose plan it is"))
|
||||
if check:
|
||||
failures = plan_file.check_failures(todo, config)
|
||||
for line in failures:
|
||||
|
||||
Reference in New Issue
Block a user