Skip to content

SP-992: Add Git capabilities to config package export/import#379

Open
Zgjim Haziri (ZgjimHaziri) wants to merge 5 commits into
mainfrom
SP-992-git-capabilities-package-commands
Open

SP-992: Add Git capabilities to config package export/import#379
Zgjim Haziri (ZgjimHaziri) wants to merge 5 commits into
mainfrom
SP-992-git-capabilities-package-commands

Conversation

@ZgjimHaziri

@ZgjimHaziri Zgjim Haziri (ZgjimHaziri) commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Adds --gitProfile / --gitBranch Git support to the single-package commands config package export and config package import, mirroring the existing behavior on the t2tc package and legacy config commands and reusing the existing GitService (pushToBranch / pullFromBranch).

  • config package export --gitBranch <branch>: pushes the package in its unzipped package layout to the branch instead of writing to the working directory (--zip is ignored on the Git path).
  • config package import --gitBranch <branch>: pulls the branch and imports the package; mutually exclusive with --file / --directory.
  • --gitProfile without --gitBranch is rejected, consistent with the other commands.

Stacked on top of #378 (single package export). The base will retarget to main once #378 merges.

Relevant links

Checklist

  • I have self-reviewed this PR
  • I have tested the change and proved that it works in different scenarios
  • I have updated docs if needed

Made with Cursor

Add `config package export`, the counterpart of `config package import`,
backed by the new single-package export API (pacman#1997). Exports a
package's staging (draft) version in the package format: unzipped into a
<packageKey> directory by default, or as a <packageKey>.zip file with --zip.
Output is written to the current working directory.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
Add --gitProfile/--gitBranch options to 'config package export' and
'config package import', reusing the existing GitService that already
backs the 't2tc package' and legacy 'config' commands.

- export: when --gitBranch is set, the package is pushed unzipped to the
  branch (--zip is ignored for the Git path).
- import: when --gitBranch is set, the branch is pulled and the package
  is imported; --gitBranch is mutually exclusive with --file/--directory.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
@ZgjimHaziri Zgjim Haziri (ZgjimHaziri) marked this pull request as ready for review June 17, 2026 08:43
Resolve modify/delete conflict in the configuration-management tests.
SP-1089 (#374) deleted the per-module unit spec
(tests/commands/configuration-management/module.spec.ts) in favor of an
integration spec. Port the `config package export` handler tests into
tests/integration/commands/configuration-management.spec.ts (driven via
the CLI parser, so the unzipped default asserts zip=false) and accept the
deletion of the old unit spec.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
…ies-package-commands

Bring the updated base (now including main's SP-1089 integration-test
refactor) into the Git-capabilities branch. Resolve the modify/delete
conflict on the deleted unit spec by porting the import/export Git tests
into tests/integration/commands/configuration-management.spec.ts and
updating the existing single-package import/export assertions for the new
gitBranch argument.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
Base automatically changed from SP-873-single-package-export to main June 18, 2026 12:51
Resolve conflicts after the base PR #378 (SP-873 single package export)
was squash-merged into main. This branch is stacked on SP-873, so it
already contained those changes plus the SP-992 Git capabilities on top.
Every conflict was therefore resolved by keeping this branch's superset
version (single-package-export.service.ts, module.ts, file-service.ts,
the export/file-service unit specs, and config-commands.md).

Also dropped a duplicate "config package export" describe block that the
auto-merge re-added from main in the integration spec (it asserted the
old 2-arg exportPackage signature). The resulting tree is identical to
this branch's pre-merge HEAD; tsc and the full jest suite pass.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant