MCPcopy Index your code
hub / github.com/github/spec-kit / _resolve_default

Method _resolve_default

src/specify_cli/workflows/engine.py:1234–1246  ·  view source on GitHub ↗

Resolve special default sentinels against project state. For the ``integration`` input, ``"auto"`` resolves to the integration recorded in ``.specify/integration.json`` so workflows dispatch to the AI the project was actually initialized with, instead of a hardcoded

(self, name: str, default: Any)

Source from the content-addressed store, hash-verified

1232 return resolved
1233
1234 def _resolve_default(self, name: str, default: Any) -> Any:
1235 """Resolve special default sentinels against project state.
1236
1237 For the ``integration`` input, ``"auto"`` resolves to the integration
1238 recorded in ``.specify/integration.json`` so workflows dispatch to the
1239 AI the project was actually initialized with, instead of a hardcoded
1240 value baked into the workflow YAML.
1241 """
1242 if name == "integration" and default == "auto":
1243 resolved = self._load_project_integration()
1244 if resolved is not None:
1245 return resolved
1246 return default
1247
1248 def _load_project_integration(self) -> str | None:
1249 """Read the default integration key from ``.specify/integration.json``.

Callers 1

_resolve_inputsMethod · 0.95

Calls 1

Tested by

no test coverage detected