From f73e7135fa6416b6e0fa108a291084abf9fcf8c2 Mon Sep 17 00:00:00 2001 From: hanyugeon Date: Wed, 29 May 2024 23:32:25 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20PR=20comment=20=EB=B0=A9=EC=8B=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/lighthouse.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index 696daabe..5470f027 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -111,17 +111,12 @@ jobs: comments += `| ${colorCode} ${formattedName} | ${average.toFixed(1)}${unit} |\n`; }); - // Pull Request에 Comment 작성 - if (comments && context.issue.number) { - const issue_number = context.issue.number; - const repo = context.repo.repo; - const owner = context.repo.owner; - github.rest.issues.createComment({ - owner, - repo, - issue_number, - body: comments - }); - } else { - console.log("No PR COMMENT!"); - }; + // comment OUT + core.setOutput('comments', comments) + + - name: Comment PR + uses: unsplash/comment-on-pr@v1.3.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + msg: ${{ steps.format_lighthouse_score.outputs.comments}}