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 379379 _request ( "POST" , repoPath + "/pulls" , options , cb ) ;
380380 } ;
381381
382+ // List hooks
383+ // --------
384+
385+ this . listHooks = function ( cb ) {
386+ _request ( "GET" , repoPath + "/hooks" , null , cb ) ;
387+ } ;
388+
389+ // Get a hook
390+ // --------
391+
392+ this . getHook = function ( id , cb ) {
393+ _request ( "GET" , repoPath + "/hooks/" + id , null , cb ) ;
394+ } ;
395+
396+ // Create a hook
397+ // --------
398+
399+ this . createHook = function ( options , cb ) {
400+ _request ( "POST" , repoPath + "/hooks" , options , cb ) ;
401+ } ;
402+
403+ // Edit a hook
404+ // --------
405+
406+ this . editHook = function ( id , options , cb ) {
407+ _request ( "PATCH" , repoPath + "/hooks/" + id , options , cb ) ;
408+ } ;
409+
410+ // Delete a hook
411+ // --------
412+
413+ this . deleteHook = function ( id , cb ) {
414+ _request ( "DELETE" , repoPath + "/hooks/" + id , null , cb ) ;
415+ } ;
416+
382417 // Read file at given path
383418 // -------
384419
You can’t perform that action at this time.
0 commit comments