diff --git a/dist/index.js b/dist/index.js index 4ae5ce2..7b2e64e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1882,6 +1882,7 @@ class Context { this.action = process.env.GITHUB_ACTION; this.actor = process.env.GITHUB_ACTOR; this.job = process.env.GITHUB_JOB; + this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10); this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`; @@ -3557,11 +3558,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { +var index_exports = {}; +__export(index_exports, { Octokit: () => Octokit }); -module.exports = __toCommonJS(dist_src_exports); +module.exports = __toCommonJS(index_exports); var import_universal_user_agent = __nccwpck_require__(3843); var import_before_after_hook = __nccwpck_require__(2732); var import_request = __nccwpck_require__(8636); @@ -3569,13 +3570,28 @@ var import_graphql = __nccwpck_require__(7); var import_auth_token = __nccwpck_require__(7864); // pkg/dist-src/version.js -var VERSION = "5.2.0"; +var VERSION = "5.2.2"; // pkg/dist-src/index.js var noop = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); +function createLogger(logger = {}) { + if (typeof logger.debug !== "function") { + logger.debug = noop; + } + if (typeof logger.info !== "function") { + logger.info = noop; + } + if (typeof logger.warn !== "function") { + logger.warn = consoleWarn; + } + if (typeof logger.error !== "function") { + logger.error = consoleError; + } + return logger; +} var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; var Octokit = class { static { @@ -3649,15 +3665,7 @@ var Octokit = class { } this.request = import_request.request.defaults(requestDefaults); this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); - this.log = Object.assign( - { - debug: noop, - info: noop, - warn: consoleWarn, - error: consoleError - }, - options.log - ); + this.log = createLogger(options.log); this.hook = hook; if (!options.authStrategy) { if (!options.auth) { @@ -4110,18 +4118,18 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { +var index_exports = {}; +__export(index_exports, { GraphqlResponseError: () => GraphqlResponseError, graphql: () => graphql2, withCustomRequest: () => withCustomRequest }); -module.exports = __toCommonJS(dist_src_exports); +module.exports = __toCommonJS(index_exports); var import_request3 = __nccwpck_require__(8636); var import_universal_user_agent = __nccwpck_require__(3843); // pkg/dist-src/version.js -var VERSION = "7.1.0"; +var VERSION = "7.1.1"; // pkg/dist-src/with-defaults.js var import_request2 = __nccwpck_require__(8636); @@ -4169,8 +4177,7 @@ function graphql(request2, query, options) { ); } for (const key in options) { - if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) - continue; + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; return Promise.reject( new Error( `[@octokit/graphql] "${key}" cannot be used as variable name`