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 }}