File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 363363 _request ( "POST" , repoPath + "/pulls" , options , cb ) ;
364364 } ;
365365
366+ // List hooks
367+ // --------
368+
369+ this . listHooks = function ( cb ) {
370+ _request ( "GET" , repoPath + "/hooks" , null , cb ) ;
371+ } ;
372+
373+ // Get a hook
374+ // --------
375+
376+ this . getHook = function ( id , cb ) {
377+ _request ( "GET" , repoPath + "/hooks/" + id , null , cb ) ;
378+ } ;
379+
380+ // Create a hook
381+ // --------
382+
383+ this . createHook = function ( options , cb ) {
384+ _request ( "POST" , repoPath + "/hooks" , options , cb ) ;
385+ } ;
386+
387+ // Edit a hook
388+ // --------
389+
390+ this . editHook = function ( id , options , cb ) {
391+ _request ( "PATCH" , repoPath + "/hooks/" + id , options , cb ) ;
392+ } ;
393+
394+ // Delete a hook
395+ // --------
396+
397+ this . deleteHook = function ( id , cb ) {
398+ _request ( "DELETE" , repoPath + "/hooks/" + id , null , cb ) ;
399+ } ;
400+
366401 // Read file at given path
367402 // -------
368403
You can’t perform that action at this time.
0 commit comments