diff --git a/.github/workflows/localization-automerge.yml b/.github/workflows/localization-automerge.yml new file mode 100644 index 000000000000..eca1b651c74a --- /dev/null +++ b/.github/workflows/localization-automerge.yml @@ -0,0 +1,25 @@ +name: 'LEGO automerge' + +on: + pull_request: + types: + - opened + branches: + - Localization + +jobs: + worker: + runs-on: ubuntu-latest + + if: github.actor == 'csigs' + steps: + - uses: actions/github-script@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.pulls.merge({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + pull_number: context.payload.pull_request.number, + merge_method: 'squash' + }) diff --git a/Tasks/FtpUploadV2/Strings/resources.resjson/en-US/resources.resjson b/Tasks/FtpUploadV2/Strings/resources.resjson/en-US/resources.resjson index f6dc665d8a74..98c922de5795 100644 --- a/Tasks/FtpUploadV2/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/FtpUploadV2/Strings/resources.resjson/en-US/resources.resjson @@ -36,6 +36,7 @@ "loc.messages.Disconnected": "disconnected", "loc.messages.DisconnectHost": "disconnecting from: %s", "loc.messages.FTPConnected": "connected: %s", + "loc.messages.InvalidFTPOptions": "There was an error when reading FTP options: %s", "loc.messages.FTPNoHostSpecified": "The FTP server URL must include a host name", "loc.messages.FTPNoProtocolSpecified": "The FTP server URL must begin with ftp:// or ftps://", "loc.messages.NoFilesFound": "Could not find any files to upload", diff --git a/Tasks/FtpUploadV2/ftpuploadtask.ts b/Tasks/FtpUploadV2/ftpuploadtask.ts index d5483ee35b28..1469c5ce0856 100644 --- a/Tasks/FtpUploadV2/ftpuploadtask.ts +++ b/Tasks/FtpUploadV2/ftpuploadtask.ts @@ -261,7 +261,13 @@ async function run() { tl.setResourcePath(path.join(__dirname, "task.json")); const tries = 3; - const ftpOptions: FtpOptions = getFtpOptions(); + let ftpOptions: FtpOptions; + try { + ftpOptions = getFtpOptions(); + } catch (err) { + tl.setResult(tl.TaskResult.Failed, tl.loc('InvalidFTPOptions', err)); + return; + } if (!ftpOptions.serverEndpointUrl.protocol) { tl.setResult(tl.TaskResult.Failed, tl.loc("FTPNoProtocolSpecified")); diff --git a/Tasks/FtpUploadV2/task.json b/Tasks/FtpUploadV2/task.json index c39757f985dd..d82f9c28df13 100644 --- a/Tasks/FtpUploadV2/task.json +++ b/Tasks/FtpUploadV2/task.json @@ -19,7 +19,7 @@ "version": { "Major": 2, "Minor": 186, - "Patch": 0 + "Patch": 1 }, "minimumAgentVersion": "2.182.1", "instanceNameFormat": "FTP Upload: $(rootFolder)", @@ -195,6 +195,7 @@ "Disconnected": "disconnected", "DisconnectHost": "disconnecting from: %s", "FTPConnected": "connected: %s", + "InvalidFTPOptions": "There was an error when reading FTP options: %s", "FTPNoHostSpecified": "The FTP server URL must include a host name", "FTPNoProtocolSpecified": "The FTP server URL must begin with ftp:// or ftps://", "NoFilesFound": "Could not find any files to upload", @@ -203,4 +204,4 @@ "UploadSucceedRes": "FTP upload successful", "UploadFailed": "Ftp Upload failed" } -} \ No newline at end of file +} diff --git a/Tasks/FtpUploadV2/task.loc.json b/Tasks/FtpUploadV2/task.loc.json index fa15e8a556b5..94abb04b546c 100644 --- a/Tasks/FtpUploadV2/task.loc.json +++ b/Tasks/FtpUploadV2/task.loc.json @@ -19,7 +19,7 @@ "version": { "Major": 2, "Minor": 186, - "Patch": 0 + "Patch": 1 }, "minimumAgentVersion": "2.182.1", "instanceNameFormat": "ms-resource:loc.instanceNameFormat", @@ -195,6 +195,7 @@ "Disconnected": "ms-resource:loc.messages.Disconnected", "DisconnectHost": "ms-resource:loc.messages.DisconnectHost", "FTPConnected": "ms-resource:loc.messages.FTPConnected", + "InvalidFTPOptions": "ms-resource:loc.messages.InvalidFTPOptions", "FTPNoHostSpecified": "ms-resource:loc.messages.FTPNoHostSpecified", "FTPNoProtocolSpecified": "ms-resource:loc.messages.FTPNoProtocolSpecified", "NoFilesFound": "ms-resource:loc.messages.NoFilesFound",