Add collaborators to GitHub repos
$ npm install github-add-collab
const githubAddCollab = require('github-add-collab');
githubAddCollab('johndoe', ['github-add-collab', 'yeoman/yo'], {
token: '523ef691191'
}).then(data => {
console.log('Successfully added user johndoe to github-add-collab and yeoman/yo');
});
Returns a promise for an array
.
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.
MIT © Kevin Mårtensson