Skip to content

Commit ac75b69

Browse files
committed
1 parent 4c8cffe commit ac75b69

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

github.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,41 @@
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

0 commit comments

Comments
 (0)