Skip to content

Commit 5540606

Browse files
mnriemCopilot
andcommitted
fix: remove no_git and branch_numbering options removed upstream
The --no-git and --branch-numbering flags were removed from `specify init` on main. Update InitStep to drop these unsupported config fields and fix tests accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3c51272 commit 5540606

3 files changed

Lines changed: 3 additions & 16 deletions

File tree

src/specify_cli/workflows/steps/init/__init__.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,10 @@ class InitStep(StepBase):
5353
``force``
5454
Merge/overwrite without confirmation when the directory is not
5555
empty.
56-
``no_git``
57-
Skip git repository initialization.
5856
``ignore_agent_tools``
5957
Skip checks for the coding agent CLI (defaults to ``true``).
6058
``preset``
6159
Preset ID to install during initialization.
62-
``branch_numbering``
63-
Branch numbering strategy (``sequential`` or ``timestamp``).
6460
"""
6561

6662
type_key = "init"
@@ -74,10 +70,8 @@ def execute(self, config: dict[str, Any], context: StepContext) -> StepResult:
7470

7571
script = self._resolve(config.get("script"), context)
7672
preset = self._resolve(config.get("preset"), context)
77-
branch_numbering = self._resolve(config.get("branch_numbering"), context)
7873

7974
force = self._resolve_bool(config.get("force"), context)
80-
no_git = self._resolve_bool(config.get("no_git"), context)
8175
# Workflows run unattended; skip the agent CLI presence check by default.
8276
ignore_agent_tools = self._resolve_bool(
8377
config.get("ignore_agent_tools", True), context
@@ -128,14 +122,10 @@ def execute(self, config: dict[str, Any], context: StepContext) -> StepResult:
128122
argv.extend(["--integration", str(integration)])
129123
if script:
130124
argv.extend(["--script", str(script)])
131-
if branch_numbering:
132-
argv.extend(["--branch-numbering", str(branch_numbering)])
133125
if preset:
134126
argv.extend(["--preset", str(preset)])
135127
if force:
136128
argv.append("--force")
137-
if no_git:
138-
argv.append("--no-git")
139129
if ignore_agent_tools:
140130
argv.append("--ignore-agent-tools")
141131

tests/test_workflows.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ def test_builds_here_argv_and_bootstraps(self, tmp_path):
990990
ctx = StepContext(
991991
project_root=str(tmp_path), default_integration="copilot"
992992
)
993-
config = {"id": "bootstrap", "here": True, "script": "sh", "no_git": True}
993+
config = {"id": "bootstrap", "here": True, "script": "sh"}
994994
result = step.execute(config, ctx)
995995

996996
assert result.status == StepStatus.COMPLETED
@@ -1011,7 +1011,7 @@ def test_default_integration_falls_back_to_workflow_default(self, tmp_path):
10111011
project_root=str(tmp_path), default_integration="copilot"
10121012
)
10131013
result = step.execute(
1014-
{"id": "bootstrap", "here": True, "script": "sh", "no_git": True}, ctx
1014+
{"id": "bootstrap", "here": True, "script": "sh"}, ctx
10151015
)
10161016
assert result.status == StepStatus.COMPLETED
10171017
assert result.output["integration"] == "copilot"
@@ -1029,7 +1029,6 @@ def test_project_name_creates_subdirectory(self, tmp_path):
10291029
"id": "bootstrap",
10301030
"project": "demo",
10311031
"script": "sh",
1032-
"no_git": True,
10331032
},
10341033
ctx,
10351034
)
@@ -1048,7 +1047,6 @@ def test_invalid_integration_fails(self, tmp_path):
10481047
"here": True,
10491048
"integration": "no-such-agent",
10501049
"script": "sh",
1051-
"no_git": True,
10521050
},
10531051
ctx,
10541052
)
@@ -1067,7 +1065,7 @@ def test_non_empty_current_dir_without_force_fails_fast(self, tmp_path):
10671065
project_root=str(tmp_path), default_integration="copilot"
10681066
)
10691067
result = step.execute(
1070-
{"id": "bootstrap", "here": True, "script": "sh", "no_git": True},
1068+
{"id": "bootstrap", "here": True, "script": "sh"},
10711069
ctx,
10721070
)
10731071
assert result.status == StepStatus.FAILED

workflows/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ and resolves the integration from the step config or the workflow default:
127127
here: true # or: project: my-project
128128
integration: copilot # Optional: defaults to workflow integration
129129
script: sh # Optional: sh or ps
130-
no_git: true # Optional
131130
force: true # Optional: required to merge into a non-empty directory
132131
preset: healthcare-compliance # Optional preset ID
133132
```

0 commit comments

Comments
 (0)