From df7becce200ee6b1d4fefe7044e0422b00acf638 Mon Sep 17 00:00:00 2001 From: Ishan Jain Date: Wed, 8 Sep 2021 00:31:20 +0530 Subject: [PATCH] Pretty print status check output in comments, Remove the colors --- .github/workflows/status.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/status.yml b/.github/workflows/status.yml index 2e72f099..3382de78 100644 --- a/.github/workflows/status.yml +++ b/.github/workflows/status.yml @@ -29,7 +29,8 @@ jobs: - name: Run status checks id: status_check run: | - output=$(node ./status-checks) + # Run status checks, Remove ANSI colors from the text + output=$(node ./status-checks | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g') # Escape newlines so _all_ the output is included in the set-output output="${output//'%'/'%25'}" output="${output//$'\n'/'%0A'}" @@ -42,7 +43,7 @@ jobs: uses: bubkoo/auto-comment@v1 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - pullRequestSynchronize: "${{ steps.status_check.outputs.status_check_output }}" - pullRequestAssigned: "${{ steps.status_check.outputs.status_check_output }}" - pullRequestOpened: "${{ steps.status_check.outputs.status_check_output }}" - pullRequestReopened: "${{ steps.status_check.outputs.status_check_output }}" + pullRequestSynchronize: "```${{ steps.status_check.outputs.status_check_output }}```" + pullRequestAssigned: "```${{ steps.status_check.outputs.status_check_output }}```" + pullRequestOpened: "```${{ steps.status_check.outputs.status_check_output }}```" + pullRequestReopened: "```${{ steps.status_check.outputs.status_check_output }}```"