# github-add-collab
**Repository Path**: mirrors_kevva/github-add-collab
## Basic Information
- **Project Name**: github-add-collab
- **Description**: Add collaborators to GitHub repos
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-09-25
- **Last Updated**: 2026-05-24
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# github-add-collab [](https://travis-ci.org/kevva/github-add-collab)
> Add collaborators to GitHub repos
## Install
```
$ npm install github-add-collab
```
## Usage
```js
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');
});
```
## API
### githubAddCollab(user, [repos], options)
Returns a promise for an `array`.
#### user
*Required*
Type: `string`
Username to add as collaborator.
#### repos
Type: `Array`
Repos to add the collaborator to.
#### options
##### token
*Required*
Type: `string`
Token to authenticate with. If you don't have a token you can generate a new one [here](https://github.com/settings/tokens/new).
##### addToAll
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.
##### addToSources
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.
## Related
* [github-add-collab-cli](https://github.com/kevva/github-add-collab-cli) - CLI for this module
## License
MIT © [Kevin Mårtensson](https://github.com/kevva)