mirror of
https://github.com/peter-evans/create-or-update-comment.git
synced 2025-01-31 19:56:39 +08:00
Merge pull request #46 from peter-evans/update-distribution
Update distribution
This commit is contained in:
commit
41f3207a84
147
dist/index.js
vendored
147
dist/index.js
vendored
@ -19,7 +19,13 @@ module.exports =
|
|||||||
/******/ };
|
/******/ };
|
||||||
/******/
|
/******/
|
||||||
/******/ // Execute the module function
|
/******/ // Execute the module function
|
||||||
|
/******/ var threw = true;
|
||||||
|
/******/ try {
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
/******/ threw = false;
|
||||||
|
/******/ } finally {
|
||||||
|
/******/ if(threw) delete installedModules[moduleId];
|
||||||
|
/******/ }
|
||||||
/******/
|
/******/
|
||||||
/******/ // Flag the module as loaded
|
/******/ // Flag the module as loaded
|
||||||
/******/ module.l = true;
|
/******/ module.l = true;
|
||||||
@ -386,13 +392,6 @@ module.exports._parse = parse;
|
|||||||
module.exports._enoent = enoent;
|
module.exports._enoent = enoent;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 34:
|
|
||||||
/***/ (function(module) {
|
|
||||||
|
|
||||||
module.exports = require("https");
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 39:
|
/***/ 39:
|
||||||
@ -1628,7 +1627,7 @@ module.exports = require("child_process");
|
|||||||
var net = __webpack_require__(631);
|
var net = __webpack_require__(631);
|
||||||
var tls = __webpack_require__(16);
|
var tls = __webpack_require__(16);
|
||||||
var http = __webpack_require__(605);
|
var http = __webpack_require__(605);
|
||||||
var https = __webpack_require__(34);
|
var https = __webpack_require__(211);
|
||||||
var events = __webpack_require__(614);
|
var events = __webpack_require__(614);
|
||||||
var assert = __webpack_require__(357);
|
var assert = __webpack_require__(357);
|
||||||
var util = __webpack_require__(669);
|
var util = __webpack_require__(669);
|
||||||
@ -2174,32 +2173,9 @@ function checkMode (stat, options) {
|
|||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 211:
|
/***/ 211:
|
||||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
|
|
||||||
Object.defineProperty(exports, '__esModule', { value: true });
|
|
||||||
|
|
||||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
||||||
|
|
||||||
var osName = _interopDefault(__webpack_require__(2));
|
|
||||||
|
|
||||||
function getUserAgent() {
|
|
||||||
try {
|
|
||||||
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
|
|
||||||
} catch (error) {
|
|
||||||
if (/wmic os get Caption/.test(error.message)) {
|
|
||||||
return "Windows <version undetectable>";
|
|
||||||
}
|
|
||||||
|
|
||||||
return "<environment undetectable>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.getUserAgent = getUserAgent;
|
|
||||||
//# sourceMappingURL=index.js.map
|
|
||||||
|
|
||||||
|
module.exports = require("https");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
@ -4036,7 +4012,7 @@ function authenticationRequestError(state, error, options) {
|
|||||||
module.exports = parseOptions;
|
module.exports = parseOptions;
|
||||||
|
|
||||||
const { Deprecation } = __webpack_require__(692);
|
const { Deprecation } = __webpack_require__(692);
|
||||||
const { getUserAgent } = __webpack_require__(796);
|
const { getUserAgent } = __webpack_require__(619);
|
||||||
const once = __webpack_require__(969);
|
const once = __webpack_require__(969);
|
||||||
|
|
||||||
const pkg = __webpack_require__(215);
|
const pkg = __webpack_require__(215);
|
||||||
@ -4646,7 +4622,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|||||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||||
|
|
||||||
var isPlainObject = _interopDefault(__webpack_require__(696));
|
var isPlainObject = _interopDefault(__webpack_require__(696));
|
||||||
var universalUserAgent = __webpack_require__(562);
|
var universalUserAgent = __webpack_require__(796);
|
||||||
|
|
||||||
function lowercaseKeys(object) {
|
function lowercaseKeys(object) {
|
||||||
if (!object) {
|
if (!object) {
|
||||||
@ -5367,7 +5343,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|||||||
var Stream = _interopDefault(__webpack_require__(413));
|
var Stream = _interopDefault(__webpack_require__(413));
|
||||||
var http = _interopDefault(__webpack_require__(605));
|
var http = _interopDefault(__webpack_require__(605));
|
||||||
var Url = _interopDefault(__webpack_require__(835));
|
var Url = _interopDefault(__webpack_require__(835));
|
||||||
var https = _interopDefault(__webpack_require__(34));
|
var https = _interopDefault(__webpack_require__(211));
|
||||||
var zlib = _interopDefault(__webpack_require__(761));
|
var zlib = _interopDefault(__webpack_require__(761));
|
||||||
|
|
||||||
// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
|
// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
|
||||||
@ -7158,13 +7134,15 @@ class GitHub extends rest_1.Octokit {
|
|||||||
static getOctokitOptions(args) {
|
static getOctokitOptions(args) {
|
||||||
const token = args[0];
|
const token = args[0];
|
||||||
const options = Object.assign({}, args[1]); // Shallow clone - don't mutate the object provided by the caller
|
const options = Object.assign({}, args[1]); // Shallow clone - don't mutate the object provided by the caller
|
||||||
|
// Base URL - GHES or Dotcom
|
||||||
|
options.baseUrl = options.baseUrl || this.getApiBaseUrl();
|
||||||
// Auth
|
// Auth
|
||||||
const auth = GitHub.getAuthString(token, options);
|
const auth = GitHub.getAuthString(token, options);
|
||||||
if (auth) {
|
if (auth) {
|
||||||
options.auth = auth;
|
options.auth = auth;
|
||||||
}
|
}
|
||||||
// Proxy
|
// Proxy
|
||||||
const agent = GitHub.getProxyAgent(options);
|
const agent = GitHub.getProxyAgent(options.baseUrl, options);
|
||||||
if (agent) {
|
if (agent) {
|
||||||
// Shallow clone - don't mutate the object provided by the caller
|
// Shallow clone - don't mutate the object provided by the caller
|
||||||
options.request = options.request ? Object.assign({}, options.request) : {};
|
options.request = options.request ? Object.assign({}, options.request) : {};
|
||||||
@ -7175,6 +7153,7 @@ class GitHub extends rest_1.Octokit {
|
|||||||
}
|
}
|
||||||
static getGraphQL(args) {
|
static getGraphQL(args) {
|
||||||
const defaults = {};
|
const defaults = {};
|
||||||
|
defaults.baseUrl = this.getGraphQLBaseUrl();
|
||||||
const token = args[0];
|
const token = args[0];
|
||||||
const options = args[1];
|
const options = args[1];
|
||||||
// Authorization
|
// Authorization
|
||||||
@ -7185,7 +7164,7 @@ class GitHub extends rest_1.Octokit {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
// Proxy
|
// Proxy
|
||||||
const agent = GitHub.getProxyAgent(options);
|
const agent = GitHub.getProxyAgent(defaults.baseUrl, options);
|
||||||
if (agent) {
|
if (agent) {
|
||||||
defaults.request = { agent };
|
defaults.request = { agent };
|
||||||
}
|
}
|
||||||
@ -7201,17 +7180,31 @@ class GitHub extends rest_1.Octokit {
|
|||||||
}
|
}
|
||||||
return typeof options.auth === 'string' ? options.auth : `token ${token}`;
|
return typeof options.auth === 'string' ? options.auth : `token ${token}`;
|
||||||
}
|
}
|
||||||
static getProxyAgent(options) {
|
static getProxyAgent(destinationUrl, options) {
|
||||||
var _a;
|
var _a;
|
||||||
if (!((_a = options.request) === null || _a === void 0 ? void 0 : _a.agent)) {
|
if (!((_a = options.request) === null || _a === void 0 ? void 0 : _a.agent)) {
|
||||||
const serverUrl = 'https://api.github.com';
|
if (httpClient.getProxyUrl(destinationUrl)) {
|
||||||
if (httpClient.getProxyUrl(serverUrl)) {
|
|
||||||
const hc = new httpClient.HttpClient();
|
const hc = new httpClient.HttpClient();
|
||||||
return hc.getAgent(serverUrl);
|
return hc.getAgent(destinationUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
static getApiBaseUrl() {
|
||||||
|
return process.env['GITHUB_API_URL'] || 'https://api.github.com';
|
||||||
|
}
|
||||||
|
static getGraphQLBaseUrl() {
|
||||||
|
let url = process.env['GITHUB_GRAPHQL_URL'] || 'https://api.github.com/graphql';
|
||||||
|
// Shouldn't be a trailing slash, but remove if so
|
||||||
|
if (url.endsWith('/')) {
|
||||||
|
url = url.substr(0, url.length - 1);
|
||||||
|
}
|
||||||
|
// Remove trailing "/graphql"
|
||||||
|
if (url.toUpperCase().endsWith('/GRAPHQL')) {
|
||||||
|
url = url.substr(0, url.length - '/graphql'.length);
|
||||||
|
}
|
||||||
|
return url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exports.GitHub = GitHub;
|
exports.GitHub = GitHub;
|
||||||
//# sourceMappingURL=github.js.map
|
//# sourceMappingURL=github.js.map
|
||||||
@ -7766,7 +7759,7 @@ function hasFirstPage (link) {
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const url = __webpack_require__(835);
|
const url = __webpack_require__(835);
|
||||||
const http = __webpack_require__(605);
|
const http = __webpack_require__(605);
|
||||||
const https = __webpack_require__(34);
|
const https = __webpack_require__(211);
|
||||||
const pm = __webpack_require__(950);
|
const pm = __webpack_require__(950);
|
||||||
let tunnel;
|
let tunnel;
|
||||||
var HttpCodes;
|
var HttpCodes;
|
||||||
@ -8325,36 +8318,6 @@ function hasPreviousPage (link) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 562:
|
|
||||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
|
|
||||||
Object.defineProperty(exports, '__esModule', { value: true });
|
|
||||||
|
|
||||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
||||||
|
|
||||||
var osName = _interopDefault(__webpack_require__(2));
|
|
||||||
|
|
||||||
function getUserAgent() {
|
|
||||||
try {
|
|
||||||
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
|
|
||||||
} catch (error) {
|
|
||||||
if (/wmic os get Caption/.test(error.message)) {
|
|
||||||
return "Windows <version undetectable>";
|
|
||||||
}
|
|
||||||
|
|
||||||
return "<environment undetectable>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.getUserAgent = getUserAgent;
|
|
||||||
//# sourceMappingURL=index.js.map
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 563:
|
/***/ 563:
|
||||||
@ -8538,6 +8501,36 @@ module.exports = require("http");
|
|||||||
|
|
||||||
module.exports = require("events");
|
module.exports = require("events");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 619:
|
||||||
|
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
Object.defineProperty(exports, '__esModule', { value: true });
|
||||||
|
|
||||||
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||||
|
|
||||||
|
var osName = _interopDefault(__webpack_require__(2));
|
||||||
|
|
||||||
|
function getUserAgent() {
|
||||||
|
try {
|
||||||
|
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
|
||||||
|
} catch (error) {
|
||||||
|
if (/wmic os get Caption/.test(error.message)) {
|
||||||
|
return "Windows <version undetectable>";
|
||||||
|
}
|
||||||
|
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.getUserAgent = getUserAgent;
|
||||||
|
//# sourceMappingURL=index.js.map
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 621:
|
/***/ 621:
|
||||||
@ -8940,7 +8933,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|||||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||||
|
|
||||||
var endpoint = __webpack_require__(385);
|
var endpoint = __webpack_require__(385);
|
||||||
var universalUserAgent = __webpack_require__(211);
|
var universalUserAgent = __webpack_require__(796);
|
||||||
var isPlainObject = _interopDefault(__webpack_require__(696));
|
var isPlainObject = _interopDefault(__webpack_require__(696));
|
||||||
var nodeFetch = _interopDefault(__webpack_require__(454));
|
var nodeFetch = _interopDefault(__webpack_require__(454));
|
||||||
var requestError = __webpack_require__(463);
|
var requestError = __webpack_require__(463);
|
||||||
@ -9173,7 +9166,7 @@ function getUserAgent() {
|
|||||||
return "Windows <version undetectable>";
|
return "Windows <version undetectable>";
|
||||||
}
|
}
|
||||||
|
|
||||||
throw error;
|
return "<environment undetectable>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24795,7 +24788,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|||||||
var request = __webpack_require__(753);
|
var request = __webpack_require__(753);
|
||||||
var universalUserAgent = __webpack_require__(796);
|
var universalUserAgent = __webpack_require__(796);
|
||||||
|
|
||||||
const VERSION = "4.3.1";
|
const VERSION = "4.5.0";
|
||||||
|
|
||||||
class GraphqlError extends Error {
|
class GraphqlError extends Error {
|
||||||
constructor(request, response) {
|
constructor(request, response) {
|
||||||
@ -24814,7 +24807,7 @@ class GraphqlError extends Error {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query"];
|
const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"];
|
||||||
function graphql(request, query, options) {
|
function graphql(request, query, options) {
|
||||||
options = typeof query === "string" ? options = Object.assign({
|
options = typeof query === "string" ? options = Object.assign({
|
||||||
query
|
query
|
||||||
|
Loading…
x
Reference in New Issue
Block a user