From 7fd8c0d6f432807d71249403b9715dce8fb5f025 Mon Sep 17 00:00:00 2001 From: hyunkim Date: Mon, 28 Sep 2026 16:34:05 +0900 Subject: [PATCH 1/2] chore: set up backend collaboration workflow (#1) --- .github/ISSUE_TEMPLATE/chore.md | 17 +++++++++++++++++ .github/ISSUE_TEMPLATE/feature.md | 23 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/fix.md | 23 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/refactor.md | 17 +++++++++++++++++ .github/pull_request_template.md | 17 +++++++++++++++++ .github/workflows/ci.yml | 23 +++++++++++++++++++++++ README.md | 18 ++++++++++++++++-- 7 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/chore.md create mode 100644 .github/ISSUE_TEMPLATE/feature.md create mode 100644 .github/ISSUE_TEMPLATE/fix.md create mode 100644 .github/ISSUE_TEMPLATE/refactor.md create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/ci.yml diff --git a/.github/ISSUE_TEMPLATE/chore.md b/.github/ISSUE_TEMPLATE/chore.md new file mode 100644 index 0000000..6f352a5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/chore.md @@ -0,0 +1,17 @@ +--- +name: Chore +about: 저장소 설정·문서·개발 환경 작업 +title: "[Chore] " +labels: "" +assignees: "" +--- + +## 목표 + +## 작업 + +- [ ] + +## 완료 조건 + +- [ ] diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md new file mode 100644 index 0000000..1bbd7b8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -0,0 +1,23 @@ +--- +name: Feature +about: 새로운 백엔드 기능 +title: "[Feat] " +labels: "" +assignees: "" +--- + +## 목표 + +사용자가 할 수 있게 되는 일을 적어주세요. + +## 범위 + +- API 경로·메서드: +- 요청·응답 필드: +- 관련 OpenAPI 항목: + +## 완료 조건 + +- [ ] 정상 요청과 오류 요청을 확인했다 +- [ ] 인증·소유권 규칙을 확인했다 +- [ ] 테스트와 OpenAPI 문서를 갱신했다 diff --git a/.github/ISSUE_TEMPLATE/fix.md b/.github/ISSUE_TEMPLATE/fix.md new file mode 100644 index 0000000..6d3a111 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/fix.md @@ -0,0 +1,23 @@ +--- +name: Fix +about: 오류 수정 +title: "[Fix] " +labels: "" +assignees: "" +--- + +## 문제 + +- 발생 조건: +- 실제 결과: +- 기대 결과: + +## 재현 방법 + +1. +2. + +## 완료 조건 + +- [ ] 같은 조건에서 문제가 재현되지 않는다 +- [ ] 관련 테스트를 추가하거나 수정했다 diff --git a/.github/ISSUE_TEMPLATE/refactor.md b/.github/ISSUE_TEMPLATE/refactor.md new file mode 100644 index 0000000..25effed --- /dev/null +++ b/.github/ISSUE_TEMPLATE/refactor.md @@ -0,0 +1,17 @@ +--- +name: Refactor +about: 동작을 유지하는 코드 구조 개선 +title: "[Refactor] " +labels: "" +assignees: "" +--- + +## 대상과 이유 + +- 대상: +- 개선할 점: + +## 완료 조건 + +- [ ] 외부 API 동작을 유지했다 +- [ ] 관련 테스트가 통과한다 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..07c8ed4 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,17 @@ +## 관련 이슈 + +Closes # + +## 변경 사항 + +- + +## 확인 + +- [ ] 로컬 빌드·테스트가 통과했다 +- [ ] API 변경 시 OpenAPI 문서를 함께 갱신했다 +- [ ] DB 변경 시 마이그레이션과 기존 데이터 영향을 확인했다 + +## 리뷰 참고 + +검토가 필요한 부분을 적어주세요. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..129b9fe --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: Backend CI + +on: + pull_request: + branches: [develop, main] + push: + branches: [develop, main] + +permissions: + contents: read + +jobs: + verify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-java@v6 + with: + distribution: temurin + java-version: "17" + cache: maven + - name: Build and test + run: mvn -B -ntp verify diff --git a/README.md b/README.md index fa7c951..923ce99 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,20 @@ Swagger: http://localhost:8080/swagger-ui.html 이미지 업로드는 MVP에서 S3 또는 Cloudinary의 업로드 URL을 요청 본문으로 받는 방식으로 두었습니다. 실제 파일 업로드가 필요해지는 시점에 presigned URL API를 추가하면 됩니다. -## 브랜치와 커밋 +## 이슈부터 PR까지 -`main`은 배포 가능한 상태로 유지하고, 작업은 `develop` 또는 `feat/<기능명>` 브랜치에서 진행합니다. 커밋은 `feat:`, `fix:`, `docs:`, `refactor:` 접두사를 사용합니다. +1. 이슈를 만들고 담당자를 정합니다. 기능·오류·리팩터링·저장소 작업 양식은 `.github/ISSUE_TEMPLATE/`에 있습니다. +2. `develop`에서 이슈 번호가 들어간 작업 브랜치를 만듭니다. +3. 작업 후 `develop` 대상으로 PR을 열고 다른 팀원의 리뷰를 받습니다. PR 본문에 `Closes #이슈번호`를 적습니다. +4. CI의 Java 17 빌드·테스트가 통과하면 병합합니다. 시연·배포할 변경을 모아 `develop`에서 `main`으로 PR을 엽니다. + +```bash +git fetch origin +git switch develop +git pull --ff-only origin develop +git switch -c 'feat/walk-log#12' # 이슈 #12 예시 +# 작업 후 +git push -u origin 'feat/walk-log#12' +``` + +브랜치 앞부분은 작업에 따라 `feat/`, `fix/`, `refactor/`, `chore/`를 사용합니다. 커밋은 `feat:`, `fix:`, `refactor:`, `chore:`, `docs:` 접두사를 사용합니다. From 7de3a5e60c77c853902ae5afa8bbc72d125bde78 Mon Sep 17 00:00:00 2001 From: hyunkim Date: Mon, 28 Sep 2026 16:38:20 +0900 Subject: [PATCH 2/2] chore: align pull request template with frontend (#1) --- .github/pull_request_template.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 07c8ed4..2dcf24a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,17 +1,23 @@ -## 관련 이슈 +## Summary -Closes # +> 관련 있는 Issue를 태그해주세요. -## 변경 사항 +- Closes # -- +_해당 PR의 작업 내용을 요약해주세요._ -## 확인 +## Tasks -- [ ] 로컬 빌드·테스트가 통과했다 +- _수행한 작업을 적어주세요._ + +## Verification + +- [ ] CI 빌드·테스트가 통과했다 - [ ] API 변경 시 OpenAPI 문서를 함께 갱신했다 - [ ] DB 변경 시 마이그레이션과 기존 데이터 영향을 확인했다 -## 리뷰 참고 +