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

github

Package Overview
Dependencies
Maintainers
2
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

examples/enterpriseUploadAsset.js

5

CHANGELOG.md
# CHANGELOG
## 7.0.1
Bug fixes:
* Fix enterprise uploadAsset edge case.
## 7.0.0

@@ -4,0 +9,0 @@

1

examples/netrcAuth.js

@@ -27,5 +27,4 @@ "use strict";

name: "z.sh"
}, function(err, res) {
console.log(err, res);
});

@@ -5,2 +5,3 @@ "use strict";

var fs = require("fs");
var HttpsProxyAgent = require('https-proxy-agent');
var mime = require("mime");

@@ -622,14 +623,25 @@ var netrc = require("netrc");

var format = getRequestFormat.call(this, hasBody, block);
var protocol = this.config.protocol || this.constants.protocol || "http";
var port = this.config.port || (protocol == "https" ? 443 : 80);
var host = block.host || this.config.host || this.constants.host;
// Edge case for github enterprise uploadAsset:
// 1) In public api, host changes to uploads.github.com. In enterprise, the host remains the same.
// 2) In enterprise, the pathPrefix changes from: /api/v3 to /api/uploads.
if ((this.config.host && this.config.host !== this.constants.host)
&& (block.host && block.host === "uploads.github.com")) { // enterprise uploadAsset
host = this.config.host;
this.config.pathPrefix = "/api/uploads";
}
var obj = getQueryAndUrl(msg, block, format, self.config);
var query = obj.query;
var url = this.config.url ? this.config.url + obj.url : obj.url;
var HttpsProxyAgent = require('https-proxy-agent');
var agent = undefined;
var path = url;
var protocol = this.config.protocol || this.constants.protocol || "http";
var host = block.host || this.config.host || this.constants.host;
var port = this.config.port || (protocol == "https" ? 443 : 80);
if (!hasBody && query.length) {
path += "?" + query.join("&");
}
var proxyUrl;
var ca = this.config.ca;
var agent = undefined;
if (this.config.proxy !== undefined) {

@@ -643,5 +655,4 @@ proxyUrl = this.config.proxy;

}
if (!hasBody && query.length) {
path += "?" + query.join("&");
}
var ca = this.config.ca;

@@ -648,0 +659,0 @@ var headers = {

{
"name": "github",
"version": "7.0.0",
"version": "7.0.1",
"description": "NodeJS wrapper for the GitHub API",

@@ -52,3 +52,3 @@ "author": "Mike de Boer <info@mikedeboer.nl>",

"name": "node-github",
"version": "7.0.0",
"version": "7.0.1",
"template": {

@@ -55,0 +55,0 @@ "withCompare": true

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