From c3d67de6652812362ac8052b9d457db556e9ff5a Mon Sep 17 00:00:00 2001 From: Max White Date: Fri, 4 Sep 2015 13:32:02 +0100 Subject: [PATCH 1/2] Add listForks --- github.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/github.js b/github.js index 6f8dc215..b9773b2d 100644 --- a/github.js +++ b/github.js @@ -324,7 +324,7 @@ if (err) { return cb(err); } - + cb(null, tags); }); }; @@ -543,6 +543,13 @@ _request("POST", repoPath + "/forks", null, cb); }; + // List forks + // -------- + + this.listForks = function(cb) { + _request("GET", repoPath + "/forks", null, cb); + }; + // Branch repository // -------- From 01a548599100de620e8e405c70801bb106d1e15a Mon Sep 17 00:00:00 2001 From: Max White Date: Tue, 20 Oct 2015 14:55:11 +0100 Subject: [PATCH 2/2] Add listForks documentation to README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 84d870dc..d4a89eb5 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,12 @@ Fork repository. This operation runs asynchronously. You may want to poll for `r repo.fork(function(err) {}); ``` +List Forks. + +```js +repo.listForks(function(err, forks) {}); +``` + Create new branch for repo. You can omit oldBranchName to default to "master". ```js