반응형
github 에서 PR작업할때 작업자(assignee) 또는 리뷰어를 수동으로 등록해야하는 번거로움이 존재하는데 (평상시에 신경안썻다면 상관없지만...)
이러한 번거로운 일을 자동으로 해주는 github action이 있어서 적용을 해보려고한다.
https://github.com/kentaro-m/auto-assign-action
GitHub - kentaro-m/auto-assign-action: An action which adds reviewers to the pull request when the pull request is opened.
An action which adds reviewers to the pull request when the pull request is opened. - kentaro-m/auto-assign-action
github.com
위 action 을 추가하면되고 작업도 자세하게 나와있지만 다시 복습할겸 쓰자면
먼저 .github/workflow 아래에 workflow 파일을 생성한다.
name: 'Auto Assign'
on:
pull_request:
types: [opened, ready_for_review]
jobs:
add-auto-assign:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/auto-assign-action@v2.0.0
with:
configuration-path: '.github/some_name_for_configs.yml' # Only needed if you use something other than .github/auto_assign.yml
그다음에 .github 폴더 아래에 configuration-path에 명시한것처럼 auto assign action에 대한 config값을 세팅해주는 파일을 생성한다.
# Set to true to add reviewers to pull requests
addReviewers: true
# Set to true to add assignees to pull requests
addAssignees: false
# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- reviewerA
- reviewerB
- reviewerC
# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0
# A list of assignees, overrides reviewers if set
# assignees:
# - assigneeA
# A number of assignees to add to the pull request
# Set to 0 to add all of the assignees.
# Uses numberOfReviewers if unset.
# numberOfAssignees: 2
# A list of keywords to be skipped the process that add reviewers if pull requests include it
# skipKeywords:
# - wip
# 만약에 draft PR에도 동작하게끔 하고싶다면 아래값 활성
# runOnDraft: true
잘작동한다면 아래와같이 github-action bot이 assignee & reviewer를 할당해준다
반응형
'Develop > DevOps' 카테고리의 다른 글
[DevOps] 인증서 관련해서 내용 정리 (1) | 2024.12.19 |
---|---|
[nginx-ingress] virtualserver, virtualserverroute (0) | 2024.12.04 |
[DevOps] Terraform, Terragrunt 에 대한 정리 (0) | 2024.11.23 |
[Grafana] database is locked 에러 대응 + DB migration (2) | 2024.10.17 |
[k8s] Kubernetes taint & toleration & nodeAffinity 공부 (0) | 2024.08.27 |