Skip to content

Commit

Permalink
fix(CI): Fixed gh pr comment formatting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SaptarshiSarkar12 committed Jan 12, 2024
1 parent d3c571d commit 4246087
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ jobs:
if: ${{ steps.lint.outcome == 'failure' && github.event_name == 'pull_request' }}
shell: bash
run: |
COMMENT_INITIAL=$(echo "## :x: Linting errors found. Please fix the following errors: <br>")
COMMENT_INITIAL=$(echo "## :x: Linting errors found. Please fix the following errors: <br> ")
COMMENT_MIDDLE=$(cat super-linter.log | grep "\[ERROR]" | sed 's/[0-9A-Z:.-]\+ [0-9:]\+ //' | sed 's/\[ERROR]//' | sed 's/ //' | sed 's/Found errors in \[[A-Za-z]\+\] linter!//' | sed 's/Error code: 1. Command output://' | sed 's/ //' | sed 's/ERRORSFOUND//' | sed 's/ in [A-Z:]\+//' | sed 's/[[0-9]\+]//' | sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g" | sed '1,2d' | tr -s '\n' '\n' | sed 's/\/github\/workspace\///')
COMMENT_BODY=$(echo "$COMMENT_INITIAL<br>\`\`\`<br>$COMMENT_MIDDLE<br>\`\`\`")
COMMENT_BODY=$(echo "$COMMENT_INITIAL\`\`\`<br>$COMMENT_MIDDLE<br>\`\`\`")
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
Expand Down

0 comments on commit 4246087

Please sign in to comment.