Skip to content

Commit

Permalink
[ENV][Fix] #1 : auto-assign-reviewers 액션 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
effozen committed Nov 7, 2024
1 parent af1f33d commit c5fbba5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/auto-assign-reviewers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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/[email protected]
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 }}

0 comments on commit c5fbba5

Please sign in to comment.