Skip to content

Commit

Permalink
Only run with additional options if they are present
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Baldry <[email protected]>
  • Loading branch information
jdbaldry committed Jan 23, 2024
1 parent 4672564 commit d27e686
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion update-make-docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ runs:
git push origin "refs/heads/${BRANCH}"
# Set default options before the user-provided ones as later options appear to override earlier ones.
# For example, in `gh pr create --web --title foo --title bar`, the resulting title is "bar".
gh pr create --title 'Update `make docs` procedure' --body '' "${OPTIONS_ARRAY[@]}"
if [[ ${#OPTIONS_ARRAY[@]} -eq 0 ]]; then
gh pr create --title 'Update `make docs` procedure' --body ''
else
gh pr create --title 'Update `make docs` procedure' --body '' "${OPTIONS_ARRAY[@]}"
fi
fi
shell: bash

0 comments on commit d27e686

Please sign in to comment.