SP-1472: Add config branch export and import (beta) - #401
Merged
Conversation
Includes-AI-Code: true
Includes-AI-Code: true
The root program registers -V, --version, which shadowed the subcommand flag: the CLI printed its own version and exited without merging. Includes-AI-Code: true
Includes-AI-Code: true
Local exports and per-branch progress on --all ignored --json, so a JSON summary was only produced when pushing to Git. Report through a single-purpose writeJson helper and let each call site choose, matching the existing branch command service. Fold the new branch-key helpers into the existing core BranchUtils rather than shipping a second class under the same name. Includes-AI-Code: true
The import endpoint derives the target package solely from package.json#key, so silently skipping the key rewrite let a mismatched source create or overwrite an unrelated package while the CLI reported success on the intended branch. Validate the source key before upload, accepting either the project key or the branch key, and fail when the rewrite cannot be applied. Includes-AI-Code: true
Exporting or importing --branchKey main resolves to '<packageKey>@main', which Pacman never creates because the key is reserved, so the command only failed once the backend returned a 404. Reject it locally with a message pointing at --all, and skip any branch keyed 'main' in --all so it cannot push over the main package's mirror. Includes-AI-Code: true
Laberion Ajvazi (LaberionAjvazi)
marked this pull request as ready for review
July 28, 2026 15:02
Drop the duplicated uncompressed-size limit, readable-stream helper and multipart assembly in favour of SinglePackageImportService, so the size limit and the "packageFile" contract have a single owner. Validate the user-supplied zip before extracting it rather than checking the archive we build afterwards, so an oversized source is rejected before it expands onto disk. Adds coverage for the --file import path, which had none. Includes-AI-Code: true
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3e014ad. Configure here.
Meris Nici (promeris)
previously approved these changes
Jul 29, 2026
Laberion Ajvazi (LaberionAjvazi)
dismissed
Meris Nici (promeris)’s stale review
July 29, 2026 11:27
The base branch was changed.
PR #399 was squash-merged, so main carries the SP-1447 branch commands as a single commit while this branch still carries them as three. Every conflict was that duplicated history rather than a real content clash: main is byte-identical to this branch's SP-1447 tip for all six files, so each conflict resolves to this branch's version, which is main's content plus the SP-1472 export/import changes on top. The two docs hunks where main had content are lines SP-1472 reworded to mention the Git mirror, so the reworded text is kept. Includes-AI-Code: true
|
Meris Nici (promeris)
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description
Adds beta
config branch exportandconfig branch import. Both read and write local files by default, and mirror a branch to a Git branch one-to-one when--gitProfileis set.export --allpushes the main package and all of its branches in one go.Relevant links
Checklist