From aeddfb0506093c1b41b824b984b7f751d88b5de8 Mon Sep 17 00:00:00 2001 From: Levente Balogh Date: Thu, 6 Jan 2022 12:02:45 +0100 Subject: [PATCH] Github Actions: another fix for the levitate workflow (#43742) * fix: add col number to the link to work correctly If we don't provide the position in a #step:{line}:{column} format then the Github UI won't take us to the correct step. * fix: escape the backtick ("`") characters properly --- .github/workflows/detect-breaking-changes-build.yml | 2 +- scripts/check-breaking-changes.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/detect-breaking-changes-build.yml b/.github/workflows/detect-breaking-changes-build.yml index fc6e5f47cc5..3554b8afcaa 100644 --- a/.github/workflows/detect-breaking-changes-build.yml +++ b/.github/workflows/detect-breaking-changes-build.yml @@ -41,7 +41,7 @@ jobs: - name: Persisting the check output run: | mkdir -p ./levitate - echo "{ \"exit_code\": ${{ steps.breaking-changes.outputs.is_breaking }}, \"message\": \"${{ steps.breaking-changes.outputs.message }}\", \"job_link\": \"${{ steps.job.outputs.link }}#step:${GITHUB_STEP_NUMBER}\" }" > ./levitate/result.json + echo "{ \"exit_code\": ${{ steps.breaking-changes.outputs.is_breaking }}, \"message\": \"${{ steps.breaking-changes.outputs.message }}\", \"job_link\": \"${{ steps.job.outputs.link }}#step:${GITHUB_STEP_NUMBER}:1\" }" > ./levitate/result.json - name: Upload check output as artifact uses: actions/upload-artifact@v2 diff --git a/scripts/check-breaking-changes.sh b/scripts/check-breaking-changes.sh index 70460b9be58..896c350f1d9 100755 --- a/scripts/check-breaking-changes.sh +++ b/scripts/check-breaking-changes.sh @@ -39,7 +39,7 @@ while IFS= read -r line; do if [ $STATUS -gt 0 ] then EXIT_CODE=1 - GITHUB_MESSAGE="${GITHUB_MESSAGE}**\`${PACKAGE_NAME}\`** has possible breaking changes ([more info](${GITHUB_JOB_LINK}#step:${GITHUB_STEP_NUMBER}:1))
" + GITHUB_MESSAGE="${GITHUB_MESSAGE}**\\\`${PACKAGE_NAME}\\\`** has possible breaking changes ([more info](${GITHUB_JOB_LINK}#step:${GITHUB_STEP_NUMBER}:1))
" fi done <<< "$PACKAGES"