Github.editWebhook()

Edit a webhook in a repo

Usage

Hover over inputs/exits for more info.

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


// Edit a webhook in a repo

Github.editWebhook({

owner: 'balderdashy',

repo: 'sails',

id: 123,

config: {},

: ,

events: [ 'push' ],

addEvents: [ 'push' ],

removeEvents: [ 'push' ],

active: true,

}).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'
id required

The ID of the hook to edit

123
config required

The configuration of the webhook.

{}
undefined

events

List of events to replace current hook events list with

[ 'push' ]
addEvents

List of events to add to current hook events list

[ 'push' ]
removeEvents

List of events to remove from current hook events list

[ 'push' ]
active

Whether or not the hook should be activated

true

Exits

error

An unexpected error occurred.

success

OK.