Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENV][Fix] #1 : auto-assign 라벨 바뀔때마다 되는 문제 수정 #179

Merged
merged 2 commits into from
Nov 17, 2024

Conversation

effozen
Copy link
Collaborator

@effozen effozen commented Nov 16, 2024

📝 PR 개요

github action 중 auto assign 버그를 수정하였습니다.

🔍 변경 사항

  • 이벤트 동작을 opened 인 경우만 처리하도록 했습니다.
on:
  pull_request:
    types: [opened]

  • 메인 브렌치인지와 dev 브렌치인 경우 리뷰어가 3명이 할당되도록 수정하였습니다.
      - name: 'Determine Number of Reviewers'
        id: determine_reviewers
        uses: actions/github-script@v6
        with:
          script: |
            const targetBranch = context.payload.pull_request.base.ref;
            const reviewers = targetBranch === 'main' ? 3 : 2;
            return { 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.number_of_reviewers }}


@github-actions github-actions bot added the 확인 요청 리뷰어에게 리뷰 요청 PR 날린 상태 (PR 머지 전) label Nov 16, 2024
@effozen
Copy link
Collaborator Author

effozen commented Nov 16, 2024

Action 특성상 Main 브렌치에 직접 업데이트되는 PR입니다.
이에 따라 본 코드는 깃허브 위에서 직접 편집이 되었습니다. (로컬의 그 어떠한 코드도 반영되어 있지 않습니다.)

action 코드가 제대로 반영이 안되어있어서 재수정
@effozen effozen requested a review from juwon5272 November 16, 2024 21:00
Copy link
Member

@happyhyep happyhyep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@juwon5272
Copy link
Collaborator

LGTM

Copy link
Collaborator

@leedongyull leedongyull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@effozen effozen merged commit fe41f0c into main Nov 17, 2024
3 of 7 checks passed
@effozen effozen added 작업 완료 PR이 제대로 되어 approve 된 상태 (PR 받은 두명 중 마지막 사람이 상태 변경) and removed 확인 요청 리뷰어에게 리뷰 요청 PR 날린 상태 (PR 머지 전) labels Nov 17, 2024
@effozen effozen deleted the feature/env/#1-auto-assign-bug-fix-1 branch November 17, 2024 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
작업 완료 PR이 제대로 되어 approve 된 상태 (PR 받은 두명 중 마지막 사람이 상태 변경)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants