From 1314ad4ca31af5d7d62f330cb82279a8db3520e7 Mon Sep 17 00:00:00 2001 From: Paul Sealock Date: Mon, 12 Sep 2022 13:14:55 +1200 Subject: [PATCH] Code Analyzer: Fix highlighter comment (#34624) Fix highlighter comment --- .github/workflows/pr-highlight-changes.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-highlight-changes.yml b/.github/workflows/pr-highlight-changes.yml index dd85a3de42c..9589ab918b4 100644 --- a/.github/workflows/pr-highlight-changes.yml +++ b/.github/workflows/pr-highlight-changes.yml @@ -17,8 +17,8 @@ jobs: - name: Run analyzer id: run run: | - version=$(pnpm run analyzer --filter code-analyzer -- major-minor "${{ github.head_ref || github.ref_name }}" "plugins/woocommerce/woocommerce.php" | tail -n 1) - pnpm run analyzer --filter code-analyzer -- "$GITHUB_HEAD_REF" $version -o "github" + version=$(pnpm run analyzer --filter code-analyzer -- major-minor "${{ github.head_ref || github.ref_name }}" "plugins/woocommerce/woocommerce.php" | tail -n 1) + pnpm run analyzer --filter code-analyzer -- "$GITHUB_HEAD_REF" $version -o "github" - name: Print results id: results run: echo "::set-output name=results::${{ steps.run.outputs.templates }}${{ steps.run.outputs.wphooks }}${{ steps.run.outputs.schema }}${{ steps.run.outputs.database }}" @@ -37,7 +37,7 @@ jobs: if: ${{ needs.analyze.outputs.results && (steps.find-comment.outputs.comment-id == '') }} uses: actions/github-script@v5 with: - github-token: ${{ secrets.WC_BOT_TRIAGE_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | github.rest.issues.createComment({ issue_number: context.issue.number, @@ -49,7 +49,7 @@ jobs: if: ${{ needs.analyze.outputs.results && steps.find-comment.outputs.comment-id }} uses: actions/github-script@v5 with: - github-token: ${{ secrets.WC_BOT_TRIAGE_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | github.rest.issues.updateComment({ comment_id: ${{ steps.find-comment.outputs.comment-id }}, @@ -61,7 +61,7 @@ jobs: if: ${{ !needs.analyze.outputs.results && steps.find-comment.outputs.comment-id }} uses: actions/github-script@v5 with: - github-token: ${{ secrets.WC_BOT_TRIAGE_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | github.rest.issues.deleteComment({ comment_id: ${{ steps.find-comment.outputs.comment-id }}, @@ -72,7 +72,7 @@ jobs: if: ${{ needs.analyze.outputs.results }} uses: actions/github-script@v5 with: - github-token: ${{ secrets.WC_BOT_TRIAGE_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | github.rest.issues.addLabels({ issue_number: context.issue.number, @@ -85,7 +85,7 @@ jobs: continue-on-error: true uses: actions/github-script@v5 with: - github-token: ${{ secrets.WC_BOT_TRIAGE_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | github.rest.issues.removeLabel({ issue_number: context.issue.number,