fix: escape colon in WARNING message to prevent YAML mapping parse

The unquoted ': ' (colon + space) in 'WARNING: AI review step failed'
was being interpreted as a YAML mapping key-value separator, causing
the entire script item to be parsed as a dict instead of a command
string. Bitbucket then rejected it with 'Missing or empty command
string' error at pull-requests > feature/* > 2 > step > script > 9.

Replaced the colon with a hyphen. Validated with yaml.safe_load that
all 10 script items in the ai-code-review step now parse as strings.
This commit is contained in:
Siddhant Medar
2026-04-14 16:43:59 -05:00
parent cbe941a7d2
commit 2a0617cd79
+1 -1
View File
@@ -139,7 +139,7 @@ definitions:
# apt-get above is still a hard failure (rare in practice).
# AI review is advisory, not a gate.
- export PR_URL="https://bitbucket.org/${BITBUCKET_WORKSPACE}/${BITBUCKET_REPO_SLUG}/pull-requests/${BITBUCKET_PR_ID}"
- cd code-review-agent && python main.py "$PR_URL" || echo "WARNING: AI review step failed (non-blocking)"
- cd code-review-agent && python main.py "$PR_URL" || echo "WARNING - AI review step failed (non-blocking)"
# =============================================================================