mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
[CI] test committed
This commit is contained in:
parent
10f43fe334
commit
46323b8608
2 changed files with 40 additions and 83 deletions
122
dist/index.js
vendored
122
dist/index.js
vendored
|
@ -5024,8 +5024,14 @@ function copyFile(srcFile, destFile, force) {
|
|||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
|
||||
const REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
|
||||
const REGEX_IS_INSTALLATION = /^ghs_/;
|
||||
const REGEX_IS_USER_TO_SERVER = /^ghu_/;
|
||||
async function auth(token) {
|
||||
const tokenType = token.split(/\./).length === 3 ? "app" : /^v\d+\./.test(token) ? "installation" : "oauth";
|
||||
const isApp = token.split(/\./).length === 3;
|
||||
const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
|
||||
const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
|
||||
const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
|
||||
return {
|
||||
type: "token",
|
||||
token: token,
|
||||
|
@ -5087,45 +5093,8 @@ var request = __nccwpck_require__(6234);
|
|||
var graphql = __nccwpck_require__(8467);
|
||||
var authToken = __nccwpck_require__(334);
|
||||
|
||||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {};
|
||||
var target = {};
|
||||
var sourceKeys = Object.keys(source);
|
||||
var key, i;
|
||||
const VERSION = "4.1.0";
|
||||
|
||||
for (i = 0; i < sourceKeys.length; i++) {
|
||||
key = sourceKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
function _objectWithoutProperties(source, excluded) {
|
||||
if (source == null) return {};
|
||||
|
||||
var target = _objectWithoutPropertiesLoose(source, excluded);
|
||||
|
||||
var key, i;
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
||||
|
||||
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
||||
key = sourceSymbolKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
const VERSION = "3.5.1";
|
||||
|
||||
const _excluded = ["authStrategy"];
|
||||
class Octokit {
|
||||
constructor(options = {}) {
|
||||
const hook = new beforeAfterHook.Collection();
|
||||
|
@ -5185,10 +5154,9 @@ class Octokit {
|
|||
}
|
||||
} else {
|
||||
const {
|
||||
authStrategy
|
||||
} = options,
|
||||
otherOptions = _objectWithoutProperties(options, _excluded);
|
||||
|
||||
authStrategy,
|
||||
...otherOptions
|
||||
} = options;
|
||||
const auth = authStrategy(Object.assign({
|
||||
request: this.request,
|
||||
log: this.log,
|
||||
|
@ -5585,8 +5553,6 @@ function parse(options) {
|
|||
} else {
|
||||
if (Object.keys(remainingParameters).length) {
|
||||
body = remainingParameters;
|
||||
} else {
|
||||
headers["content-length"] = 0;
|
||||
}
|
||||
}
|
||||
} // default content-type for JSON if body is set
|
||||
|
@ -5629,7 +5595,7 @@ function withDefaults(oldDefaults, newDefaults) {
|
|||
});
|
||||
}
|
||||
|
||||
const VERSION = "6.0.12";
|
||||
const VERSION = "7.0.3";
|
||||
|
||||
const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url.
|
||||
// So we use RequestParameters and add method as additional required property.
|
||||
|
@ -5666,26 +5632,27 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||
var request = __nccwpck_require__(6234);
|
||||
var universalUserAgent = __nccwpck_require__(5030);
|
||||
|
||||
const VERSION = "4.6.4";
|
||||
|
||||
class GraphqlError extends Error {
|
||||
constructor(request, response) {
|
||||
const message = response.data.errors[0].message;
|
||||
super(message);
|
||||
Object.assign(this, response.data);
|
||||
Object.assign(this, {
|
||||
headers: response.headers
|
||||
});
|
||||
this.name = "GraphqlError";
|
||||
this.request = request; // Maintains proper stack trace (only available on V8)
|
||||
const VERSION = "5.0.4";
|
||||
|
||||
function _buildMessageForResponseErrors(data) {
|
||||
return `Request failed due to following response errors:\n` + data.errors.map(e => ` - ${e.message}`).join("\n");
|
||||
}
|
||||
class GraphqlResponseError extends Error {
|
||||
constructor(request, headers, response) {
|
||||
super(_buildMessageForResponseErrors(response));
|
||||
this.request = request;
|
||||
this.headers = headers;
|
||||
this.response = response;
|
||||
this.name = "GraphqlResponseError";
|
||||
// Expose the errors and response data in their shorthand properties.
|
||||
this.errors = response.errors;
|
||||
this.data = response.data;
|
||||
// Maintains proper stack trace (only available on V8)
|
||||
/* istanbul ignore next */
|
||||
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"];
|
||||
|
@ -5696,13 +5663,11 @@ function graphql(request, query, options) {
|
|||
if (typeof query === "string" && "query" in options) {
|
||||
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
|
||||
}
|
||||
|
||||
for (const key in options) {
|
||||
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
|
||||
return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`));
|
||||
}
|
||||
}
|
||||
|
||||
const parsedOptions = typeof query === "string" ? Object.assign({
|
||||
query
|
||||
}, options) : query;
|
||||
|
@ -5711,50 +5676,38 @@ function graphql(request, query, options) {
|
|||
result[key] = parsedOptions[key];
|
||||
return result;
|
||||
}
|
||||
|
||||
if (!result.variables) {
|
||||
result.variables = {};
|
||||
}
|
||||
|
||||
result.variables[key] = parsedOptions[key];
|
||||
return result;
|
||||
}, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix
|
||||
}, {});
|
||||
// workaround for GitHub Enterprise baseUrl set with /api/v3 suffix
|
||||
// https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451
|
||||
|
||||
const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;
|
||||
|
||||
if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
|
||||
requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
|
||||
}
|
||||
|
||||
return request(requestOptions).then(response => {
|
||||
if (response.data.errors) {
|
||||
const headers = {};
|
||||
|
||||
for (const key of Object.keys(response.headers)) {
|
||||
headers[key] = response.headers[key];
|
||||
}
|
||||
|
||||
throw new GraphqlError(requestOptions, {
|
||||
headers,
|
||||
data: response.data
|
||||
});
|
||||
throw new GraphqlResponseError(requestOptions, headers, response.data);
|
||||
}
|
||||
|
||||
return response.data.data;
|
||||
});
|
||||
}
|
||||
|
||||
function withDefaults(request$1, newDefaults) {
|
||||
const newRequest = request$1.defaults(newDefaults);
|
||||
|
||||
function withDefaults(request, newDefaults) {
|
||||
const newRequest = request.defaults(newDefaults);
|
||||
const newApi = (query, options) => {
|
||||
return graphql(newRequest, query, options);
|
||||
};
|
||||
|
||||
return Object.assign(newApi, {
|
||||
defaults: withDefaults.bind(null, newRequest),
|
||||
endpoint: request.request.endpoint
|
||||
endpoint: newRequest.endpoint
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -5772,6 +5725,7 @@ function withCustomRequest(customRequest) {
|
|||
});
|
||||
}
|
||||
|
||||
exports.GraphqlResponseError = GraphqlResponseError;
|
||||
exports.graphql = graphql$1;
|
||||
exports.withCustomRequest = withCustomRequest;
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
@ -7135,7 +7089,7 @@ var isPlainObject = __nccwpck_require__(3287);
|
|||
var nodeFetch = _interopDefault(__nccwpck_require__(467));
|
||||
var requestError = __nccwpck_require__(537);
|
||||
|
||||
const VERSION = "5.6.0";
|
||||
const VERSION = "6.2.2";
|
||||
|
||||
function getBufferResponse(response) {
|
||||
return response.arrayBuffer();
|
||||
|
@ -7151,7 +7105,9 @@ function fetchWrapper(requestOptions) {
|
|||
let headers = {};
|
||||
let status;
|
||||
let url;
|
||||
const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch;
|
||||
const fetch = requestOptions.request && requestOptions.request.fetch || globalThis.fetch ||
|
||||
/* istanbul ignore next */
|
||||
nodeFetch;
|
||||
return fetch(requestOptions.url, Object.assign({
|
||||
method: requestOptions.method,
|
||||
body: requestOptions.body,
|
||||
|
@ -7229,7 +7185,7 @@ function fetchWrapper(requestOptions) {
|
|||
data
|
||||
};
|
||||
}).catch(error => {
|
||||
if (error instanceof requestError.RequestError) throw error;
|
||||
if (error instanceof requestError.RequestError) throw error;else if (error.name === "AbortError") throw error;
|
||||
throw new requestError.RequestError(error.message, 500, {
|
||||
request: requestOptions
|
||||
});
|
||||
|
|
1
report.txt
Normal file
1
report.txt
Normal file
|
@ -0,0 +1 @@
|
|||
1670808000
|
Loading…
Add table
Add a link
Reference in a new issue