Breaking change. The monorepo's gitea host was previously inferred from the
first target's subrepo_url, silently coupling the two and breaking on any
multi-host setup (monorepo on host A, target on host B). v2.0.0 replaces the
inference with a required josh.monorepo_url field that mirrors subrepo_url —
same parsing, same SSH/HTTPS auth options, same shape.
- schema_version: 2 is now required; v1 configs are rejected with a clear migration error
- josh.monorepo_url is required; josh.monorepo_auth is optional (default https)
- mono_auth_url() in lib/auth.sh mirrors subrepo_auth_url()
- MONOREPO_API derives from monorepo_url's host instead of .[0].gitea_host;
env-var override preserved as escape hatch
- initial_import() and force-push call mono_auth_url() instead of building URLs inline
- ADR-012 documents the rationale; CHANGELOG includes migration snippet
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bypasses the PR step and force-pushes the subrepo's state directly onto
the monorepo branch. Also skips the skip-dirty guard. Only valid with
--reverse. Returns status "forced".
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When josh-proxy rejects a reverse sync push due to unmappable merge
commits, fall back to linearizing: cherry-pick regular commits
individually, squash only the merge commits via cherry-pick -m 1.
Also adds a recommended Git workflow section to the guide explaining
where cross-branch merges should happen (monorepo) vs feature work
(subrepo), and expands troubleshooting for the "josh rejected push"
error with root cause analysis and prevention advice.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New `exclude` config field per target generates .josh-filters/<name>.josh
files with josh :exclude clauses. Josh-proxy applies exclusions at the
transport layer — excluded files never appear in the subrepo.
Preflight checks that generated filter files are committed.
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>