From 629a6ae907c2e5422d7203dfa89c113974981c81 Mon Sep 17 00:00:00 2001 From: Mark Kennedy Date: Thu, 12 Feb 2015 12:32:16 -0500 Subject: [PATCH] Added release methods --- github.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/github.js b/github.js index 69825395..e36e0d52 100644 --- a/github.js +++ b/github.js @@ -659,6 +659,34 @@ } _request("GET", url, null, cb); }; + + // Create a new release + // -------- + + this.createRelease = function(options, cb) { + _request("POST", repoPath + "/releases", options, cb); + }; + + // Edit a release + // -------- + + this.editRelease = function(id, options, cb) { + _request("PATCH", repoPath + "/releases/" + id, options, cb); + }; + + // Get a single release + // -------- + + this.getRelease = function(id, options, cb) { + _request("GET", repoPath + "/releases/" + id, options, cb); + }; + + // Remove a release + // -------- + + this.deleteRelease = function(id, options, cb) { + _request("DELETE", repoPath + "/releases/" + id, options, cb); + }; }; // Gists API