Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

octonode

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

octonode - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

30

lib/octonode/repo.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc