From f22e3ab52fc34dde0ed0d82ad45f6e680ae99e82 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Thu, 4 May 2023 09:30:48 -0400 Subject: [PATCH] Change log level for release branch message Signed-off-by: Timothy Johnson --- dist/run-script.js | 64 ++++++++++++++++---------------- packages/run-script/src/index.ts | 2 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/dist/run-script.js b/dist/run-script.js index 40546a2..77455eb 100644 --- a/dist/run-script.js +++ b/dist/run-script.js @@ -1166,12 +1166,12 @@ var require_lib = __commonJS({ throw new Error("Client has already been disposed."); } const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); + let info2 = this._prepareRequest(verb, parsedUrl, headers); const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; let numTries = 0; let response; do { - response = yield this.requestRaw(info, data); + response = yield this.requestRaw(info2, data); if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { let authenticationHandler; for (const handler of this.handlers) { @@ -1181,7 +1181,7 @@ var require_lib = __commonJS({ } } if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); + return authenticationHandler.handleAuthentication(this, info2, data); } else { return response; } @@ -1204,8 +1204,8 @@ var require_lib = __commonJS({ } } } - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); + info2 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info2, data); redirectsRemaining--; } if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { @@ -1234,7 +1234,7 @@ var require_lib = __commonJS({ * @param info * @param data */ - requestRaw(info, data) { + requestRaw(info2, data) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { function callbackForResult(err, res) { @@ -1246,7 +1246,7 @@ var require_lib = __commonJS({ resolve2(res); } } - this.requestRawWithCallback(info, data, callbackForResult); + this.requestRawWithCallback(info2, data, callbackForResult); }); }); } @@ -1256,12 +1256,12 @@ var require_lib = __commonJS({ * @param data * @param onResult */ - requestRawWithCallback(info, data, onResult) { + requestRawWithCallback(info2, data, onResult) { if (typeof data === "string") { - if (!info.options.headers) { - info.options.headers = {}; + if (!info2.options.headers) { + info2.options.headers = {}; } - info.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + info2.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); } let callbackCalled = false; function handleResult(err, res) { @@ -1270,7 +1270,7 @@ var require_lib = __commonJS({ onResult(err, res); } } - const req = info.httpModule.request(info.options, (msg) => { + const req = info2.httpModule.request(info2.options, (msg) => { const res = new HttpClientResponse(msg); handleResult(void 0, res); }); @@ -1282,7 +1282,7 @@ var require_lib = __commonJS({ if (socket) { socket.end(); } - handleResult(new Error(`Request timeout: ${info.options.path}`)); + handleResult(new Error(`Request timeout: ${info2.options.path}`)); }); req.on("error", function(err) { handleResult(err); @@ -1309,27 +1309,27 @@ var require_lib = __commonJS({ return this._getAgent(parsedUrl); } _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === "https:"; - info.httpModule = usingSsl ? https : http; + const info2 = {}; + info2.parsedUrl = requestUrl; + const usingSsl = info2.parsedUrl.protocol === "https:"; + info2.httpModule = usingSsl ? https : http; const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; - info.options.path = (info.parsedUrl.pathname || "") + (info.parsedUrl.search || ""); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); + info2.options = {}; + info2.options.host = info2.parsedUrl.hostname; + info2.options.port = info2.parsedUrl.port ? parseInt(info2.parsedUrl.port) : defaultPort; + info2.options.path = (info2.parsedUrl.pathname || "") + (info2.parsedUrl.search || ""); + info2.options.method = method; + info2.options.headers = this._mergeHeaders(headers); if (this.userAgent != null) { - info.options.headers["user-agent"] = this.userAgent; + info2.options.headers["user-agent"] = this.userAgent; } - info.options.agent = this._getAgent(info.parsedUrl); + info2.options.agent = this._getAgent(info2.parsedUrl); if (this.handlers) { for (const handler of this.handlers) { - handler.prepareRequest(info.options); + handler.prepareRequest(info2.options); } } - return info; + return info2; } _mergeHeaders(headers) { if (this.requestOptions && this.requestOptions.headers) { @@ -2165,18 +2165,18 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); command_1.issueCommand("error", utils_1.toCommandProperties(properties2), message instanceof Error ? message.toString() : message); } exports.error = error2; - function warning2(message, properties2 = {}) { + function warning(message, properties2 = {}) { command_1.issueCommand("warning", utils_1.toCommandProperties(properties2), message instanceof Error ? message.toString() : message); } - exports.warning = warning2; + exports.warning = warning; function notice(message, properties2 = {}) { command_1.issueCommand("notice", utils_1.toCommandProperties(properties2), message instanceof Error ? message.toString() : message); } exports.notice = notice; - function info(message) { + function info2(message) { process.stdout.write(message + os.EOL); } - exports.info = info; + exports.info = info2; function startGroup(name) { command_1.issue("group", name); } @@ -13199,7 +13199,7 @@ function run() { logPrefix: scriptName }); if (context3 == null) { - core3.warning("Current branch is not targeting a release branch, exiting now"); + core3.info("Current branch is not targeting a release branch, exiting now"); process.exit(); } yield loadScript(scriptName)(context3); diff --git a/packages/run-script/src/index.ts b/packages/run-script/src/index.ts index 84ee810..625af30 100644 --- a/packages/run-script/src/index.ts +++ b/packages/run-script/src/index.ts @@ -38,7 +38,7 @@ async function run(): Promise { logPrefix: scriptName }); if (context == null) { - core.warning("Current branch is not targeting a release branch, exiting now"); + core.info("Current branch is not targeting a release branch, exiting now"); process.exit(); }