Github.addCollaborator()

Add a collaborator to a repo

Usage

Hover over inputs/exits for more info.

var Github = require('machinepack-github');


// Add a collaborator to a repo

Github.addCollaborator({

owner: 'balderdashy',

repo: 'sails',

username: 'sailsbot',

permission: 'pull',

: ,

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

owner required

The name of the organization or user that owns the repo (i.e. as it appears in the URL on GitHub)

'balderdashy'
repo required

The name of the Github repo (i.e. as it appears in the URL on GitHub)

'sails'
username required

Username of user to add as collaborator.

'sailsbot'
permission required

Permissions to give the new collaborator

'pull'
undefined

Exits

error

An unexpected error occurred.

success

OK.