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

ci: add pr langauge labeler on pull_request_target event #379

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

bky373
Copy link
Contributor

@bky373 bky373 commented Aug 25, 2024

배경

  • Fixes: PR language labeling 워크플로 수행시 403 Forbidden 오류 발생  #368
  • 2024-08-25(일) 정기 스터디 모임 이후 운영진들과 나눈 대화에서 labeler 를 pull_request_target 이벤트를 사용하여 해결해보기로 결정.
  • 자체 테스트를 해보니 직접 구현하는 방법도 좋지만, @DaleSeo 님, @sounmind 님이 이 알려주신 GitHub Actions 의 actions/labeler 를 사용하는 게 더 깔끔한 구현이 가능하여 이를 사용하여 작업 진행.
    • @sounmind예제 작업 잘 참고하였습니다. 감사합니다 에반님! 그리고 가이드 주셔서 감사합니다 달레님! 🙇

작업

  • actions/labeler 의 사용법대로, .github/labeler.yml 에 원하는 조건과 label 구성을 정의
  • pull_request_target 이벤트 기반으로 작성하던 기존 automation 이벤트에 label-lang job 새로 추가

테스트

  • 지난 번과 달리 이번에는 fork repository 에서 base repository 로 PR 을 열어 테스트를 진행함.
  • 테스트 수행 결과 -> 정상 작동 확인
    image

Note

pull_request_targetpull_request 와 달리, base repo의 컨텍스트를 기반으로 작동하기 때문에 main 에 병합된 이후 올라온 PR 부터 automation 이 작동합니다.

Copy link
Member

@sounmind sounmind left a comment

Choose a reason for hiding this comment

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

ㅎㅎㅎ너무 좋네요! 고생하셨습니다!!

@TonyKim9401
Copy link
Contributor

고생 많으십니다 ㅜ 좋은 기능 추가해주셔서 감사합니다!!

@DaleSeo DaleSeo mentioned this pull request Aug 26, 2024
9 tasks
@bky373 bky373 merged commit e33cc14 into DaleStudy:main Aug 27, 2024
1 check passed
@bky373
Copy link
Contributor Author

bky373 commented Aug 27, 2024

@DaleSeo 아이고 comment 가 resolved 돼서 달레님 승인도 받은 걸로 착각했네요 ..
다음 PR 때 정상 작동하는지 확인해보겠습니다..!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PR language labeling 워크플로 수행시 403 Forbidden 오류 발생
4 participants