File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,21 +81,21 @@ jobs:
8181
8282 title="[$category] $message"
8383
84- # ---- Build code snippet safely ----
84+ # Build code snippet first
8585 if [ -n "$line_text" ]; then
8686 code_snippet="**Code Snippet:**\n\`\`\`csharp\n$line_text\n\`\`\`\n\n"
8787 else
8888 code_snippet=""
8989 fi
90-
91- # Build body using single-quoted heredoc to avoid backtick issues
92- body=$(cat <<'EOF'
93- **File:** `'"$file"'`
94- **Line:** '"$line"'
95- **Rule:** '"$category"' ('"$severity"')
96- **Commit:** `'"$sha"'`
9790
98- '"$code_snippet"'**Codacy ID:** `'"$id"'`
91+ # Build body safely using double-quoted heredoc
92+ body=$(cat <<EOF
93+ **File:** \`$file\`
94+ **Line:** $line
95+ **Rule:** $category ($severity)
96+ **Commit:** \`$sha\`
97+
98+ $code_snippet**Codacy ID:** \`$id\`
9999 EOF
100100 )
101101
You can’t perform that action at this time.
0 commit comments