Keep configs in ~/.config/build-release/ and tool state in ~/.local/state/build-release/, under XDG_* where set
CI / tests (pull_request) Successful in 6m34s
CI / tests (pull_request) Successful in 6m34s
This commit is contained in:
@@ -12,12 +12,12 @@ from plan_store.plans import PlanStore
|
||||
from record_store.stores import store
|
||||
|
||||
|
||||
def owed_scoring_run(default: str, home: pathlib.Path, warn: typing.Callable[[str], None]) -> Failure | None:
|
||||
def owed_scoring_run(default: str, home: pathlib.Path, env: typing.Mapping[str, str], warn: typing.Callable[[str], None]) -> Failure | None:
|
||||
"""A Failure saying which scoring runs the chunk owes and has not recorded; None where it owes none.
|
||||
|
||||
The chunk owes the runs `plan_reasons` calls, two where it empties a release, else one. It has recorded the scoring runs its committed history holds beyond those at the merge base, so a default branch that has moved on since the branch began doesn't count. A project with no plan owes none. Neither does one whose plan or history is outside the checkout: it warns that it cannot tell. A missing run blocks the merge and a low score never does, which keeps the decision `review: the comprehension check records …`: it bars only scores from blocking.
|
||||
"""
|
||||
config = located(None, home)
|
||||
config = located(None, home, env)
|
||||
if isinstance(config, Failure):
|
||||
return config
|
||||
checkout = str(config.top)
|
||||
@@ -33,7 +33,7 @@ def owed_scoring_run(default: str, home: pathlib.Path, warn: typing.Callable[[st
|
||||
base = git("merge-base", default, "HEAD", cwd=checkout)
|
||||
if isinstance(base, Failure):
|
||||
return base
|
||||
reasons = plan_reasons(base.strip(), None, home)
|
||||
reasons = plan_reasons(base.strip(), None, home, env)
|
||||
if isinstance(reasons, Failure):
|
||||
return reasons
|
||||
if not reasons:
|
||||
|
||||
Reference in New Issue
Block a user