mirror-repo
v1.1.0
Published
A simple node module that allows you to manually (and cleanly) fork a Github repository into another location. The magic behind therebelrobot/mirror
Downloads
15
Maintainers
Readme
mirror-repo
A node utility to manually clone Github repositories.
Github, by design, restricts the number of times you can fork a repo into a single account. Even then, after forking, you are bound to the upstream in your repo page, which if you are doing an iterative work can sometimes be a hinderance to marketing. There are hacks and workarounds for this, but mirror allows you to manually clone a repo with a single command.
Installation
npm i mirror-repo
Usage
To use mirror, you'll need to generate a Github Personal Access Token, found here. You should only grant this token the permissions it needs, which is repo. (If you discover it needs other permissions besides that, lemme know)
API
var mirror = require('mirror-repo')
var mirrorOpts = {
username: username,
token: token,
host: 'github.com',
source: {
account: 'other-user',
repo: 'other-repo'
},
target: {
account: 'your-user',
repo: 'your-repo'
},
create: true
}
mirror.repo(mirrorOpts)
.then(function (data) {
console.log('mirror was successful!')
})
.catch(function (err) {
console..error(err)
})
Contributing
What is needed
Moar tests
License
ISC