octonode
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -78,8 +78,18 @@ // Generated by CoffeeScript 1.7.1 | ||
Repo.prototype.createCommit = function(message, tree, parents, cb) { | ||
return this.client.post("/repos/" + this.name + "/git/commits", { | ||
message: message, | ||
parents: parents, | ||
tree: tree | ||
}, function(err, s, b) { | ||
Repo.prototype.createCommit = function(message, tree, parents, cbOrOptions, cb) { | ||
var param; | ||
if ((cb == null) && cbOrOptions) { | ||
cb = cbOrOptions; | ||
param = { | ||
message: message, | ||
parents: parents, | ||
tree: tree | ||
}; | ||
} else if (typeof cbOrOptions === 'hash') { | ||
param = cbOrOptions; | ||
param['message'] = message; | ||
param['parents'] = parents; | ||
param['tree'] = tree; | ||
} | ||
return this.client.post("/repos/" + this.name + "/git/commits", param, function(err, s, b, h) { | ||
if (err) { | ||
@@ -91,3 +101,3 @@ return cb(err); | ||
} else { | ||
return cb(null, b); | ||
return cb(null, b, h); | ||
} | ||
@@ -94,0 +104,0 @@ }); |
{ | ||
"name": "octonode", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"author": "Pavan Kumar Sunkara <pavan.sss1991@gmail.com> (http://pksunkara.github.com)", | ||
@@ -5,0 +5,0 @@ "description": "nodejs wrapper for github v3 api", |
89420
1968