-
[backend.ai] #742. Auto-generate and auto-commit news fragment from PR title프로젝트/오픈소스 컨트리뷰톤 2022. 10. 2. 18:15
Auto-generate and auto-commit news fragment from PR title · Issue #742 · lablup/backend.ai
It seems better to describe that you need to git pull after creating the PR instead of to teach how to write news fragments for new developers and external cotnributors. Let's do the followings...
github.com
✏️ Issue Content
프로젝트에 새롭게 기여하는 컨트리뷰터들에게 news fragment 작성 방법을 설명하는 번거로움을 덜기 위하여
PR제목을 수정할 경우 towncrier news fragment를 자동으로 생성/수정하도록 workflow를 구현하자✏️ Requirements
- PR에 assign된 label과 매칭되는 news fragment를 가져오고, PR 제목이 변경될 경우 그 내용을 자동으로 수정/commit/push한다
- assign된 label이 없는 경우는 workflow를 수행하지 않는다
- label과 매칭되는 news fragment가 없는 경우 workflow는 failure를 뱉어야 한다
- news fragment가 존재하지 않는 경우, 현재의 PR제목으로 news fragment를 생성해주자
✏️ Ideation & Issue Solving
- 7e3320 news fragment를 생성 및 수정하는 파이선 스크립트 파일을 생성하고,
ArgumentParser
를 사용하여 변경할 내용(--content) / 매칭여부를 확인할 label(-f, --fragment)을 인자로 전달할 수 있도록 구현.
scripts/update-news-fragment.py - 33b854
pyproject.toml
에 정의된 towncrier 설정값을 가져오는 함수를 작성. → tomli module 사용
전달된 label값이 config에 정의되어 있는 news fragment tag가 아닌 경우는 바로 스크립트를 종료하도록 예외처리를 구현.
scripts/update-news-fragment.py .github/workflow/timeline-check.yml 각각의 vector에 대한 action을 독립적으로 수행한다 - c95c1d PR제목으로 news fragment가 업데이트 된 경우에는 git-auto-commit-action@v4 을 사용하여 파일이 자동으로 commit, push되도록 workflow를 구현.
✏️ Pull Request Review
ci: auto-generate and auto-commit news fragment from PR by soheeeeP · Pull Request #762 · lablup/backend.ai
issue #742 Description Add the python script scripts/update-news-fragment.py to handle the news fragments. Check existence of the news fragment from the matching labels Create the news fragment b...
github.com
'프로젝트 > 오픈소스 컨트리뷰톤' 카테고리의 다른 글
[backend.ai] hotfix PR 뜯어보기 (2) 2022.10.06 [backend.ai] #614. ImageNotFound message typo error (0) 2022.10.03 [backend.ai] #691. Add the commit history between releases in the release notes (1) 2022.09.14 [backend.ai] #575. introduce vfolder status (0) 2022.09.14