fix: escape commit message in Detect Changes step (#90)

The commit message was being directly inserted into the bash comparison,
which broke when the message contained special characters like parentheses.

Fix by assigning to a variable first before the comparison.
This commit is contained in:
Jatin K Malik
2026-01-28 23:27:42 -08:00
committed by GitHub
parent ad84fd882a
commit 44634bb529
+2 -1
View File
@@ -41,10 +41,11 @@ jobs:
id: deploy_check
run: |
# Deploy if web files changed OR python files changed (for version updates)
COMMIT_MESSAGE="${{ github.event.head_commit.message }}"
if [[ "${{ steps.filter.outputs.web }}" == "true" ]] || \
[[ "${{ steps.filter.outputs.python }}" == "true" ]] || \
[[ "${{ github.event_name }}" == "workflow_dispatch" ]] || \
[[ "${{ github.event.head_commit.message }}" == *"[web]"* ]]; then
[[ "$COMMIT_MESSAGE" == *"[web]"* ]]; then
echo "deploy=true" >> $GITHUB_OUTPUT
else
echo "deploy=false" >> $GITHUB_OUTPUT