From faba5e0790030bb976e140978ac63ad85280b21f Mon Sep 17 00:00:00 2001 From: Shane Powser Date: Thu, 16 Nov 2023 09:11:56 -0800 Subject: [PATCH 1/2] Support hostnames that include "psql" Update the documentation Fix typo Better backwards compatibility Clean up --- src/Utils/ActionInputs.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Utils/ActionInputs.ts b/src/Utils/ActionInputs.ts index 36826be6..9e79251a 100644 --- a/src/Utils/ActionInputs.ts +++ b/src/Utils/ActionInputs.ts @@ -24,7 +24,8 @@ export class ActionInputs { } private parseConnectionString() { - this._connectionString = this._connectionString.replace('psql', "").replace(/["]+/g, '').trim(); + // Replace the "psql " part of the psql command copied from the Azure portal connection info + this._connectionString = this._connectionString.replace(/^psql\s/,'').replace(/["]+/g, '').trim(); if (!this.validateConnectionString()) { throw new Error(`Please provide a valid connection string. A valid connection string is a series of keyword/value pairs separated by space. Spaces around the equal sign are optional. To write an empty value, or a value containing spaces, surround it with single quotes, e.g., keyword = 'a value'. Single quotes and backslashes within the value must be escaped with a backslash`); } From d18555396f4a7c9a198b27c12bf485e2380f964e Mon Sep 17 00:00:00 2001 From: Shane Date: Thu, 16 Nov 2023 09:31:18 -0800 Subject: [PATCH 2/2] Support Node 16 --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index fff48757..e5b09640 100644 --- a/action.yml +++ b/action.yml @@ -15,5 +15,5 @@ inputs: description: 'Additional options supported by postgresql simple SQL shell. These options will be applied when executing the given file on the Azure DB for Postgresql. In case of multiple files, the same args will be applied for all files' required: false runs: - using: 'node12' + using: 'node16' main: 'lib/main.js'