Skip to content

Commit

Permalink
build(release): compiled action for 1.1.24
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
semantic-release-bot committed Dec 3, 2020
1 parent ef63e1f commit 45293e2
Showing 1 changed file with 210 additions and 8 deletions.
218 changes: 210 additions & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var universalUserAgent = __webpack_require__(796);
var request = __webpack_require__(753);
var request = __webpack_require__(814);
var deprecation = __webpack_require__(692);
var universalGithubAppJwt = __webpack_require__(292);
var LRU = _interopDefault(__webpack_require__(702));
Expand Down Expand Up @@ -1336,7 +1336,7 @@ async function getInstallationAuthentication(state, options, customRequest) {
// @ts-ignore
single_file: singleFileName
}
} = await request("POST /app/installations/:installation_id/access_tokens", {
} = await request("POST /app/installations/{installation_id}/access_tokens", {
installation_id: installationId,
repository_ids: options.repositoryIds,
permissions: options.permissions,
Expand Down Expand Up @@ -1420,17 +1420,17 @@ async function auth(state, options) {
return getOAuthAuthentication(state, options);
}

const PATHS = ["/app", "/app/installations", "/app/installations/:installation_id", "/app/installations/:installation_id/access_tokens", "/marketplace_listing/accounts/:account_id", "/marketplace_listing/plan", "/marketplace_listing/plans/:plan_id/accounts", "/marketplace_listing/stubbed/accounts/:account_id", "/marketplace_listing/stubbed/plan", "/marketplace_listing/stubbed/plans/:plan_id/accounts", "/orgs/:org/installation", "/repos/:owner/:repo/installation", "/users/:username/installation"]; // CREDIT: Simon Grondin (https://github.com/SGrondin)
const PATHS = ["/app", "/app/installations", "/app/installations/{installation_id}", "/app/installations/{installation_id}/access_tokens", "/marketplace_listing/accounts/{account_id}", "/marketplace_listing/plan", "/marketplace_listing/plans/{plan_id}/accounts", "/marketplace_listing/stubbed/accounts/{account_id}", "/marketplace_listing/stubbed/plan", "/marketplace_listing/stubbed/plans/{plan_id}/accounts", "/orgs/{org}/installation", "/repos/{owner}/{repo}/installation", "/users/{username}/installation"]; // CREDIT: Simon Grondin (https://github.com/SGrondin)
// https://github.com/octokit/plugin-throttling.js/blob/45c5d7f13b8af448a9dbca468d9c9150a73b3948/lib/route-matcher.js

function routeMatcher(paths) {
// EXAMPLE. For the following paths:

/* [
"/orgs/:org/invitations",
"/repos/:owner/:repo/collaborators/:username"
"/orgs/{org}/invitations",
"/repos/{owner}/{repo}/collaborators/{username}"
] */
const regexes = paths.map(p => p.split("/").map(c => c.startsWith(":") ? "(?:.+?)" : c).join("/")); // 'regexes' would contain:
const regexes = paths.map(p => p.split("/").map(c => c.startsWith("{") ? "(?:.+?)" : c).join("/")); // 'regexes' would contain:

/* [
'/orgs/(?:.+?)/invitations',
Expand Down Expand Up @@ -1540,7 +1540,7 @@ async function sendRequestWithRetries(state, request, options, createdAt, retrie
}
}

const VERSION = "2.10.2";
const VERSION = "2.10.4";

const createAppAuth = function createAppAuth(options) {
const log = Object.assign({
Expand Down Expand Up @@ -3238,7 +3238,7 @@ module.exports = isString;

Object.defineProperty(exports, '__esModule', { value: true });

const VERSION = "2.6.0";
const VERSION = "2.6.2";

/**
* Some “list” response that can be paginated have a different response structure
Expand Down Expand Up @@ -7761,6 +7761,52 @@ function octokitPluginStdoutProgress(octokit) {
}


/***/ }),

/***/ 538:
/***/ (function(__unusedmodule, exports) {

"use strict";


Object.defineProperty(exports, '__esModule', { value: true });

/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/

function isObject(o) {
return Object.prototype.toString.call(o) === '[object Object]';
}

function isPlainObject(o) {
var ctor,prot;

if (isObject(o) === false) return false;

// If has modified constructor
ctor = o.constructor;
if (ctor === undefined) return true;

// If has modified prototype
prot = ctor.prototype;
if (isObject(prot) === false) return false;

// If constructor does not have an Object-specific method
if (prot.hasOwnProperty('isPrototypeOf') === false) {
return false;
}

// Most likely a plain Object
return true;
}

exports.isPlainObject = isPlainObject;


/***/ }),

/***/ 546:
Expand Down Expand Up @@ -10191,6 +10237,162 @@ exports.createTokenAuth = createTokenAuth;
//# sourceMappingURL=index.js.map


/***/ }),

/***/ 814:
/***/ (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 endpoint = __webpack_require__(385);
var universalUserAgent = __webpack_require__(796);
var isPlainObject = __webpack_require__(538);
var nodeFetch = _interopDefault(__webpack_require__(454));
var requestError = __webpack_require__(463);

const VERSION = "5.4.12";

function getBufferResponse(response) {
return response.arrayBuffer();
}

function fetchWrapper(requestOptions) {
if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
requestOptions.body = JSON.stringify(requestOptions.body);
}

let headers = {};
let status;
let url;
const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch;
return fetch(requestOptions.url, Object.assign({
method: requestOptions.method,
body: requestOptions.body,
headers: requestOptions.headers,
redirect: requestOptions.redirect
}, requestOptions.request)).then(response => {
url = response.url;
status = response.status;

for (const keyAndValue of response.headers) {
headers[keyAndValue[0]] = keyAndValue[1];
}

if (status === 204 || status === 205) {
return;
} // GitHub API returns 200 for HEAD requests


if (requestOptions.method === "HEAD") {
if (status < 400) {
return;
}

throw new requestError.RequestError(response.statusText, status, {
headers,
request: requestOptions
});
}

if (status === 304) {
throw new requestError.RequestError("Not modified", status, {
headers,
request: requestOptions
});
}

if (status >= 400) {
return response.text().then(message => {
const error = new requestError.RequestError(message, status, {
headers,
request: requestOptions
});

try {
let responseBody = JSON.parse(error.message);
Object.assign(error, responseBody);
let errors = responseBody.errors; // Assumption `errors` would always be in Array format

error.message = error.message + ": " + errors.map(JSON.stringify).join(", ");
} catch (e) {// ignore, see octokit/rest.js#684
}

throw error;
});
}

const contentType = response.headers.get("content-type");

if (/application\/json/.test(contentType)) {
return response.json();
}

if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
return response.text();
}

return getBufferResponse(response);
}).then(data => {
return {
status,
url,
headers,
data
};
}).catch(error => {
if (error instanceof requestError.RequestError) {
throw error;
}

throw new requestError.RequestError(error.message, 500, {
headers,
request: requestOptions
});
});
}

function withDefaults(oldEndpoint, newDefaults) {
const endpoint = oldEndpoint.defaults(newDefaults);

const newApi = function (route, parameters) {
const endpointOptions = endpoint.merge(route, parameters);

if (!endpointOptions.request || !endpointOptions.request.hook) {
return fetchWrapper(endpoint.parse(endpointOptions));
}

const request = (route, parameters) => {
return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));
};

Object.assign(request, {
endpoint,
defaults: withDefaults.bind(null, endpoint)
});
return endpointOptions.request.hook(request, endpointOptions);
};

return Object.assign(newApi, {
endpoint,
defaults: withDefaults.bind(null, endpoint)
});
}

const request = withDefaults(endpoint.endpoint, {
headers: {
"user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}`
}
});

exports.request = request;
//# sourceMappingURL=index.js.map


/***/ }),

/***/ 815:
Expand Down

0 comments on commit 45293e2

Please sign in to comment.