Add collaborators to GitHub repos
$ npm install --save github-add-collab
var githubAddCollab = require('github-add-collab');
githubAddCollab('johndoe', ['github-add-collab', 'yeoman/yo'], {
token: '523ef691191'
}, function (err, data) {
console.log('Successfully added user johndoe to github-add-collab and yeoman/yo');
});
Required
Type: string
Username to add as collaborator.
Type: array
Repos to add the collaborator to.
Required
Type: string
Token to authenticate with. If you don't have a token you can generate a new one here.
Type: boolean
If no repos are defined and this option is set to true
it'll add the user to all repositories that the token has access to.
Type: boolean
If no repos are defined and this option is set to true
it'll add the user to all non-forked repositories that the token has access to.
Type: function
Returns an error if something goes wrong.
$ npm install --global github-add-collab
$ github-add-collab --help
Usage
$ github-add-collab <user> [repos]
Example
$ github-add-collab johndoe github-add-collab yeoman/yo --token 523ef69119
$ github-add-collab johndoe --add-to-all --token 523ef69119
Options
-a, --add-to-all Add to all repositories
-s, --add-to-sources Add to source repositories
-t, --token Github token to authenticate with
-v, --verbose Show detailed output
MIT © Kevin Mårtensson