Github.listWebhooks()

List all webhooks in a repo

Usage

Hover over inputs/exits for more info.

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


// List all webhooks in a repo

Github.listWebhooks({

owner: 'balderdashy',

repo: 'sails',

: ,

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

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'
undefined

Exits

error

An unexpected error occurred.

success

OK.

[ { id: 1,
    url: 'https://api.github.com/repos/octocat/Hello-World/hooks/1',
    test_url: 'https://api.github.com/repos/octocat/Hello-World/hooks/1/test',
    ping_url: 'https://api.github.com/repos/octocat/Hello-World/hooks/1/pings',
    name: 'web',
    events: [ 'push', 'pull_request' ],
    active: true,
    config: { url: 'http://example.com/webhook', content_type: 'json' },
    updated_at: '2011-09-06T20:39:23Z',
    created_at: '2011-09-06T17:26:27Z' } ]