Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
kodster28 committed Dec 12, 2023
1 parent 25bc24d commit 5ea00fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/automated-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ jobs:
# Prepare the new comment body with case-police output
case_police_output=$(cat case_police_output.txt)
new_comment_body=$(echo "$existing_comment_body" | sed "s/<!-- TYPO_PLACEHOLDER_START -->.*<!-- TYPO_PLACEHOLDER_END -->/<!-- TYPO_PLACEHOLDER_START -->$case_police_output<!-- TYPO_PLACEHOLDER_END -->/")
escaped_case_police_output=$(echo "$case_police_output" | sed 's/\\/\\\\/g; s/\//\\\//g; s/&/\\\&/g; s/\n/\\n/g')
new_comment_body=$(echo "$existing_comment_body" | sed "s|<!-- TYPO_PLACEHOLDER_START -->.*<!-- TYPO_PLACEHOLDER_END -->|<!-- TYPO_PLACEHOLDER_START -->$escaped_case_police_output<!-- TYPO_PLACEHOLDER_END -->|")
# Format the new comment body as JSON
updated_comment_body=$(jq -n --arg body "$new_comment_body" '{body: $body}')
Expand Down

0 comments on commit 5ea00fa

Please sign in to comment.