Comparing version 0.9.0 to 0.9.1
@@ -548,13 +548,23 @@ // Generated by CoffeeScript 1.12.7 | ||
Repo.prototype.updateContents = function(path, message, content, sha, cbOrBranch, cb) { | ||
if ((cb == null) && cbOrBranch) { | ||
cb = cbOrBranch; | ||
cbOrBranch = 'master'; | ||
Repo.prototype.updateContents = function(path, message, content, sha, cbOrBranchOrOptions, cb) { | ||
var params; | ||
content = new Buffer(content).toString('base64'); | ||
if ((cb == null) && cbOrBranchOrOptions) { | ||
cb = cbOrBranchOrOptions; | ||
cbOrBranchOrOptions = 'master'; | ||
} | ||
return this.client.put("/repos/" + this.name + "/contents/" + path, { | ||
branch: cbOrBranch, | ||
message: message, | ||
content: new Buffer(content).toString('base64'), | ||
sha: sha | ||
}, function(err, s, b, h) { | ||
if (typeof cbOrBranchOrOptions === 'string') { | ||
params = { | ||
branch: cbOrBranchOrOptions, | ||
message: message, | ||
content: content, | ||
sha: sha | ||
}; | ||
} else if (typeof cbOrBranchOrOptions === 'object') { | ||
params = cbOrBranchOrOptions; | ||
params['message'] = message; | ||
params['content'] = content; | ||
params['sha'] = sha; | ||
} | ||
return this.client.put("/repos/" + this.name + "/contents/" + path, params, function(err, s, b, h) { | ||
if (err) { | ||
@@ -561,0 +571,0 @@ return cb(err); |
{ | ||
"name": "octonode", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"author": "Pavan Kumar Sunkara <pavan.sss1991@gmail.com> (http://pksunkara.github.com)", | ||
@@ -5,0 +5,0 @@ "description": "nodejs wrapper for github v3 api", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
153098
3419
21