Interactive picker now marks already-migrated PRs. All modes (--all,
explicit numbers, interactive) track and display success/fail/skip
counts at the end.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of fetching the API diff (which has context-sensitive patches
that break after josh-filtered reset), fetch the archived repo's
branches directly as a second remote and compute the diff locally.
Apply with git apply --3way for resilience against context mismatches.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
initial_import() now accepts an optional clone URL override parameter.
onboard_flow() passes the archived repo URL so content is cloned from
the right source.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- flake.nix: copy VERSION file to $out/ so josh_sync_version() finds it
- Makefile: add lib/onboard.sh to the bundle loop
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- README: add onboard and migrate-pr to CLI reference
- Guide Step 5: add onboard as recommended Option A, move manual
import/reset to Option B, document migrate-pr usage
- Guide "Adding a New Target": mention onboard as preferred path
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New commands for safely onboarding existing subrepos into the monorepo
without losing open PRs:
- josh-sync onboard <target>: interactive, resumable 5-step flow
(import → wait for merge → reset to new repo)
- josh-sync migrate-pr <target> [PR#...] [--all]: migrate PRs from
archived repo to new repo via patch application
Also refactors create_pr() to wrap create_pr_number(), eliminating
duplicated curl/jq logic.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- SC2015: Wrap A && B || C patterns in brace groups for directive scope
- SC2064: Suppress for intentional early trap expansion (local vars)
- SC2164: Add || exit to cd commands in subshells
- SC2001: Suppress for sed URL injection (clearer than parameter expansion)
- SC1083: Handle {tree} git syntax (quote or suppress)
- SC1091: Suppress for runtime-resolved source paths
- SC2034: Remove unused exit codes (E_OK, E_CONFIG, E_AUTH)
- SC2116: Eliminate useless echo in mono_auth_url construction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>