Import and mirrors
Move once, and keep a copy where you need it
Import a repository from GitHub, GitLab or any git URL, once, with its history and open pull requests. Then, if you like, push it on to mirrors elsewhere after every push the guard accepts, one way only.
Import
One import, with its open pull requests
Give Branchscope a GitHub or GitLab repository, or any public https:// git URL, and every branch and tag comes over with its full history. Open pull and merge requests from GitHub and GitLab become open changes, and each gets a graph review. After that nothing is synced: Branchscope never calls the source again.
$ bscope repo import https://github.com/acme/billing --waitfound 2 open pull requestsfetched 6 branches and 14 tags (38 MB)pushed through the push guard as alice: alloweddefault branch: mainopened change #1 from #41 Add invoice exportopened change #2 from #44 Fix VAT roundingImported https://github.com/acme/billing into alice/billing: 6 branches, 14 tags, 2 changes.
Push guard
Every imported ref passes the push guard
An import is a push by you, decided by the same push guard as any other, and shown in activity as yours. If the guard denies it, or can't be reached, nothing is imported and the import says why. A token you paste for a private source is used for that import only, and never stored.
$ bscope repo import https://gitlab.com/acme/platform/api --waitfound 1 open merge requestfetched 3 branches and 5 tags (12 MB)bscope: the import into alice/api failed: push guard unavailable, import rejected
Mirrors
Mirrors that only get what the guard accepted
After every push Branchscope accepts, and every merge, the same branches and tags go on to each mirror: GitHub, GitLab or any git host. It's one way: Branchscope never reads a mirror back, and what the guard refused never reaches one. Deletions and force pushes reach a mirror only when you turn them on. A repository has at most 10 mirrors, and a sync that fails is tried again later, at growing intervals.
$ git push origin main9c1d22a..7e4f0b1 main -> main$ bscope mirror listID URL SIGNS IN WITH STATUS LAST SYNC2 https://github.com/acme/billing.git token ok 2 minutes ago3 git@gitlab.com:acme/billing.git deploy-key ok 2 minutes ago
Credentials
A deploy key of its own, or your token
Over SSH, Branchscope makes an Ed25519 deploy key for the mirror alone and shows its public half to add on the other host; the private half is encrypted under the server's SECRETS_KEY. Over HTTPS, the mirror signs in with one of your saved external tokens, which is only ever sent to the host it's for. Repository administrators set mirrors up, as do site administrators, always as people.
$ bscope mirror add git@gitlab.com:acme/billing.gitAdded mirror 3: git@gitlab.com:acme/billing.git.Add this deploy key to the repository there, with write access:ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI… branchscope-mirror-acme/billingThen push, or run bscope mirror sync 3.
Bring your repository over
Choose Import a repository, paste its URL, and its open pull requests arrive as changes with reviews.