From c5fbba591cf7ae33e55923984aca2e19936bad4e Mon Sep 17 00:00:00 2001 From: effozen Date: Thu, 7 Nov 2024 15:17:32 +0900 Subject: [PATCH] =?UTF-8?q?[ENV][Fix]=20#1=20:=20auto-assign-reviewers=20?= =?UTF-8?q?=EC=95=A1=EC=85=98=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-assign-reviewers.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto-assign-reviewers.yml b/.github/workflows/auto-assign-reviewers.yml index 97e38488..ba48e125 100644 --- a/.github/workflows/auto-assign-reviewers.yml +++ b/.github/workflows/auto-assign-reviewers.yml @@ -13,7 +13,7 @@ jobs: with: script: | if (context.payload.pull_request) { - await github.issues.addAssignees({ + await github.rest.issues.addAssignees({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.pull_request.number, @@ -25,12 +25,11 @@ jobs: - name: 'Add "확인 요청" Label if not present' uses: actions/github-script@v6 - id: label_check with: script: | const labels = context.payload.pull_request.labels || []; if (!labels.some(label => label.name === '확인 요청')) { - await github.issues.addLabels({ + await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.pull_request.number, @@ -44,11 +43,12 @@ jobs: with: script: | const targetBranch = context.payload.pull_request.base.ref; - return targetBranch === 'main' ? 3 : 2; + const reviewers = targetBranch === 'main' ? 3 : 2; + core.setOutput('number_of_reviewers', reviewers); - name: 'Assign Reviewers' uses: kentaro-m/auto-assign-action@v2.0.0 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' configuration-path: '.github/auto_assign_config.yml' - numberOfReviewers: ${{ steps.determine_reviewers.outputs.result }} + numberOfReviewers: ${{ steps.determine_reviewers.outputs.number_of_reviewers }}