|
| 1 | +# 워크플로우 이름 |
| 2 | +name: 이슈 자동화 |
| 3 | + |
| 4 | +# 실행 조건: 이슈가 열렸을 때 |
| 5 | +on: |
| 6 | + issues: |
| 7 | + types: [ opened ] |
| 8 | + |
| 9 | +# 실행할 작업 |
| 10 | +jobs: |
| 11 | + automate-issue: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + permissions: |
| 14 | + issues: write |
| 15 | + contents: read |
| 16 | + |
| 17 | + steps: |
| 18 | + # 이슈 제목에 따라 Label 자동 할당 (예시) |
| 19 | + - name: feat 라벨 할당 |
| 20 | + if: contains(github.event.issue.title, 'feat') |
| 21 | + uses: actions-ecosystem/action-add-labels@v1 |
| 22 | + with: |
| 23 | + labels: feat |
| 24 | + |
| 25 | + - name: fix 라벨 할당 |
| 26 | + if: contains(github.event.issue.title, 'fix') |
| 27 | + uses: actions-ecosystem/action-add-labels@v1 |
| 28 | + with: |
| 29 | + labels: fix |
| 30 | + |
| 31 | + - name: refactor 라벨 할당 |
| 32 | + if: contains(github.event.issue.title, 'refactor') |
| 33 | + uses: actions-ecosystem/action-add-labels@v1 |
| 34 | + with: |
| 35 | + labels: refactor |
| 36 | + |
| 37 | + - name: chore 라벨 할당 |
| 38 | + if: contains(github.event.issue.title, 'chore') |
| 39 | + uses: actions-ecosystem/action-add-labels@v1 |
| 40 | + with: |
| 41 | + labels: chore |
| 42 | + |
| 43 | + - name: test 라벨 할당 |
| 44 | + if: contains(github.event.issue.title, 'test') |
| 45 | + uses: actions-ecosystem/action-add-labels@v1 |
| 46 | + with: |
| 47 | + labels: test |
| 48 | + |
| 49 | + # 이슈를 연 사람을 assignee로 자동 할당 |
| 50 | + - name: 이슈 작성자를 assignee로 할당 |
| 51 | + uses: actions-cool/issues-helper@v3 |
| 52 | + with: |
| 53 | + actions: 'add-assignees' |
| 54 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 55 | + issue-number: ${{ github.event.issue.number }} |
| 56 | + assignees: ${{ github.event.issue.user.login }} |
| 57 | + |
| 58 | + # '프로젝트'의 'Backlog' 컬럼에 자동 추가 |
| 59 | + - name : Github 프로젝트에 추가 |
| 60 | + uses: jinhokim98/project-flow-add-issue-to-project@v1 |
| 61 | + with: |
| 62 | + github_token: ${{ secrets.PROJECT_ACCESS_TOKEN }} |
| 63 | + project_owner: prgrms-web-devcourse-final-project |
| 64 | + project_number: 156 |
| 65 | + target_column: 'Backlog' |
0 commit comments