From a1e9ae0ef2cda75e5fdb21fa107018dc927588c0 Mon Sep 17 00:00:00 2001 From: Brian Smith <112954497+brian-smith-tcril@users.noreply.github.com> Date: Sun, 12 Nov 2023 23:43:11 -0500 Subject: [PATCH] fix: ensure we have an empty string instead of null for `selectedRepo` When running the `extract-translation-source-files` workflow via dispatch `selectedRepo` pulls from `inputs.repo` which is always a string (but can be an empty string). The logic throughout the rest of the workflow assumes an empty string, but fails with null or undefined. This just add a null coalesce that defaults `selectedRepo` to an empty string so the rest of the logic works. --- .github/workflows/extract-translation-source-files.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/extract-translation-source-files.yml b/.github/workflows/extract-translation-source-files.yml index 1a51abb3575..a1b6866657b 100644 --- a/.github/workflows/extract-translation-source-files.yml +++ b/.github/workflows/extract-translation-source-files.yml @@ -26,7 +26,7 @@ jobs: script: | // Need to use a workaround until https://github.com/actions/toolkit/issues/1576 is fixed // const selectedRepo = core.getInput('repo'); - const selectedRepo = ${{ toJSON(github.event.inputs.repo) }}; + const selectedRepo = ${{ toJSON(github.event.inputs.repo) }} ?? ''; const allPythonRepos = [ 'AudioXBlock',