Skip to content

Commit

Permalink
fix: ensure we have an empty string instead of null for selectedRepo
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brian-smith-tcril authored and OmarIthawi committed Nov 13, 2023
1 parent fb7ffcb commit a1e9ae0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/extract-translation-source-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit a1e9ae0

Please sign in to comment.