codedang
codedang copied to clipboard
feat: add workflows for tracking pull-requests
Closes #332
Description
- Issue 등록 시 Project 자동 등록 (+ status, team 자동 설정)
- PR 등록 시 상태 자동 변경 (status 'Review PLZ')
- 리뷰 제출 시 상태 자동 변경 (status 'Under Review' or 'Approved')
GitHub Actions를 이용해서 GitHub Project의 task 관련 update를 자동화하는 것이 목표였습니다.
1번의 경우에는 Issue가 생성될 때 project에서 자동적으로 Item을 pending 상태로 등록하는 것을 확인했습니다.
Team 설정의 경우에는 workflow에서 설정이 불가능하더군요...
Issue 생성할 때 우측 배너의 Projects에서 team 설정은 가능해 보이지만, 자동화가 필요하다면 후딱 추가해서 넣겠습니다.
- Team 설정은 issue 생성 시 설정하는 label (feat:frontend, feat:backend, feat:ci) 바탕으로 FE, BE, CI 이렇게 3개로 team 설정을 하면 되는건가요?
2번과 3번의 경우에는 github script로 설정해보려 했지만, project 설정하는 내용은 찾지 못했습니다. (제가 못찾은 걸 수도..ㅠㅠ) 그래서 github api 활용해서 project status 를 update 하는 방식으로 작성해봤습니다.
Additional context
API 사용할 때 활용할 Token이 필요한데 제가 설정할 수 없는 것 같아서 확인해주시면 감사하겠습니다!
Before submitting the PR, please make sure you do the following
- [ ] Read the Contributing Guidelines
- [ ] Read the Contributing Guidelines and follow the Commit Convention
- [ ] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g.
fixes #123). - [ ] Ideally, include relevant tests that fail without this PR but pass with it.