From 15c28944dfb2d7640a71b1670bacfbd004dfa3b5 Mon Sep 17 00:00:00 2001 From: Doeunnkimm Date: Sat, 22 Jun 2024 01:45:59 +0900 Subject: [PATCH] fix --- .github/workflows/auto-approve.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index e49630bd..cfd034dd 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -13,16 +13,16 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Auto approve PR - uses: hmarr/auto-approve-action@v2.0.0 + - name: Approve and Comment on PR + uses: actions/github-script@v6 with: github-token: ${{ secrets.ACCESS_TOKEN }} - - - name: Comment on PR - run: | - PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") - curl -s -X POST \ - -H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" \ - -H "Content-Type: application/json" \ - -d "{\"body\":\"고생했다. 🎉👍🏽\"}" \ - "https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments" + script: | + const prNumber = context.payload.pull_request.number; + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: prNumber, + event: 'APPROVE', + body: '고생했다. 🎉👍🏽' + });