-
Notifications
You must be signed in to change notification settings - Fork 0
[Release] Dev -> Prod 병합 #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
84174eb
[Refactor] 서버 튜닝 환경 반영 (#48)
taek2222 e761b36
[Refactor] 동시성 테스트 스레드 카운트 톰켓 스레드 수치 동결 (#46)
taek2222 6b1f59e
[Refactor] CodeRabbit 레거시 프롬프트 수정 (#53)
taek2222 78df996
[Chore] Gemini Code 리뷰 시스템 추가 (#59)
taek2222 1978c83
[Refactor] 2차 테스트 코드 스프린트 (병렬 제외) (#62)
taek2222 796002b
[Feat] 리뷰 리마인더 시스템 도입 (#65)
taek2222 4f5d349
[Feat] 리뷰 리마인더 시스템 도입(테스트 트리거 제거) #67
taek2222 af5c4cf
[Refactor] GitHub 알림 메시지 포맷 고도화 (#70)
taek2222 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| code_review: | ||
| # [코멘트 중요도 임계값] | ||
| comment_severity_threshold: MEDIUM | ||
| # [최대 리뷰 코멘트 수] | ||
| max_review_comments: 20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # festabook Style Guide | ||
|
|
||
| ## 0. Base Convention | ||
|
|
||
| **팀 컨벤션 규칙입니다.** | ||
|
|
||
| * 프로젝트 루트 경로에 있는 **`code-style.md`** 파일을 반드시 읽고, 그 안에 정의된 네이밍 규칙, 포맷팅, 프로젝트 구조를 최우선으로 준수하세요. | ||
|
|
||
| ## 1. Review Persona: "The Insightful Mentor" | ||
|
|
||
| 우리 팀은 주니어 개발자들로 구성되어 있습니다. 당신의 목표는 단순한 코드 수정이 아니라, **개발자의 시야를 넓혀주고 성장을 돕는 것**입니다. | ||
|
|
||
| * **Why over What:** 코드를 "이렇게 고치세요"라고 하기 전에, **"왜 현재 방식이 문제가 될 수 있는지"** 원리를 설명해 주세요. | ||
| * **Broaden Horizons:** 당장 돌아가는 코드라도, 트래픽이 100배 늘어났을 때 발생할 수 있는 문제나, 유지보수 관점에서의 한계점을 짚어주세요. | ||
| * **Encouragement:** 잘 작성된 코드나 좋은 설계 시도가 보이면 구체적으로 칭찬하여 동기를 부여해 주세요. | ||
|
|
||
| ## 2. Critical: Stability & Performance (심화 학습) | ||
|
|
||
| 주니어 개발자가 놓치기 쉬운 시스템 안정성 문제를 집중적으로 가이드해 주세요. | ||
|
|
||
| * **Memory Management:** | ||
| * `Stream.collect()`로 대량의 데이터를 한 번에 메모리에 로드하거나, `static` 컬렉션에 데이터가 쌓이는 패턴(OOM 위험)을 경고해 주세요. | ||
| * **Concurrency Awareness:** | ||
| * "이 코드가 동시에 1,000명의 유저에게 호출된다면?"이라는 관점을 심어주세요. | ||
| * 공유 자원에 대한 Race Condition 가능성을 짚어주고, `Atomic` 변수나 동시성 컬렉션 활용을 제안하세요. | ||
| * **Database & Transactions:** | ||
| * 외부 API 호출(Network I/O)이 `@Transactional` 범위 내에 있어 DB 커넥션을 불필요하게 오래 잡고 있는지 확인하세요. | ||
| * N+1 문제 가능성이 보이는 곳은 `Fetch Join`이나 `Batch Size` 등의 해결책을 키워드로 제시해 주세요. | ||
|
|
||
| ## 3. Architecture & Design Thinking (설계적 사고) | ||
|
|
||
| * **Rich Domain Model:** | ||
| * 비즈니스 로직이 Service 계층에만 절차지향적으로 작성되어 있다면(Transaction Script), 도메인 객체에게 책임을 위임하여 객체지향적으로 리팩토링하도록 유도하세요. | ||
| * **SRP & Cohesion:** | ||
| * 하나의 클래스나 메서드가 너무 많은 일을 하고 있다면, "이 클래스의 핵심 책임은 무엇인가요?"라고 질문을 던져 분리를 유도하세요. | ||
|
|
||
| ## 4. Feedback Style: Trade-offs (선택의 기술) | ||
|
|
||
| 정답을 강요하지 말고, 상황에 따른 선택지를 제공하여 개발자가 스스로 고민하게 만드세요. | ||
|
|
||
| * **Format:** | ||
| * **[관점 A: 성능 최적화]** 캐싱이나 복잡한 쿼리를 사용하면 빠르지만 구현 난이도가 올라갑니다. | ||
| * **[관점 B: 유지보수성]** 코드는 단순해지지만 DB 부하가 늘어날 수 있습니다. | ||
| * **Conclusion:** 현재 프로젝트 단계에서는 B가 적절해 보입니다. (또는 팀원의 의견을 물어보세요) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| module.exports = async ({github, context, core}) => { | ||
|
|
||
| // 최소 PR 생성 시간 | ||
| const LIMIT_HOURS = 12; | ||
| const LIMIT_MS = LIMIT_HOURS * 60 * 60 * 1000; | ||
|
|
||
| const WEBHOOK_URL = process.env.SLACK_WEBHOOK_REVIEW; | ||
|
|
||
| // GitHub, Slack 정보 | ||
| const USER_MAP = { | ||
| 'taek2222': 'U099ARRH3D3', | ||
| 'soeun2537': 'U09A0LM0CRW', | ||
| 'changuii': 'U099BR9RNE6' | ||
| }; | ||
|
|
||
| const repoName = context.repo.repo; | ||
|
|
||
| if (!WEBHOOK_URL) { | ||
| core.setFailed("❌ Error: SLACK_WEBHOOK_REVIEW 환경변수가 설정되지 않았습니다."); | ||
| return; | ||
| } | ||
|
|
||
| try { | ||
| // GitHub API 호출로 Open PR 목록 요청 | ||
| const {data: prs} = await github.rest.pulls.list({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| state: 'open', // 오픈 PR | ||
| sort: 'created', // 정렬 기준 | ||
| direction: 'asc' // 오름차순 | ||
| }); | ||
|
|
||
| const now = new Date(); | ||
| const delayedPrs = []; // 알림 대상 | ||
|
|
||
| for (const pr of prs) { | ||
| const createdDate = new Date(pr.created_at); | ||
| const diffTime = now - createdDate; // PR 생성 시간 차이 (ms) | ||
|
|
||
| if (diffTime >= LIMIT_MS) { | ||
|
|
||
| // 리뷰어 정보 가공 (없으면 '미지정' 처리) | ||
| const reviewers = pr.requested_reviewers.length > 0 | ||
| ? pr.requested_reviewers.map(r => { | ||
| const slackId = USER_MAP[r.login]; | ||
| return slackId ? `<@${slackId}>` : r.login; | ||
| }).join(', ') | ||
| : '(리뷰어 미지정)'; | ||
|
|
||
| // 지난 시간 | ||
| const passedHours = Math.floor(diffTime / (1000 * 60 * 60)); | ||
|
|
||
| const authorSlackId = USER_MAP[pr.user.login]; | ||
| const authorDisplay = authorSlackId ? `<@${authorSlackId}>` : pr.user.login; | ||
|
|
||
| // 알림 전송 객체 생성 | ||
| delayedPrs.push({ | ||
| title: pr.title, | ||
| url: pr.html_url, | ||
| author: authorDisplay, | ||
| reviewers: reviewers, | ||
| hours: passedHours | ||
| }); | ||
| } | ||
| } | ||
|
|
||
| // 지연 PR 없을 시 종료 | ||
| if (delayedPrs.length === 0) { | ||
| return; | ||
| } | ||
|
|
||
| const message = { | ||
| text: `🚨 (${repoName}) 코드 리뷰 리마인더`, | ||
| blocks: [ | ||
| { | ||
| "type": "header", | ||
| "text": { | ||
| "type": "plain_text", | ||
| "text": `🔥 (${repoName}) 코드 리뷰 리마인더`, | ||
| "emoji": true | ||
| } | ||
| }, | ||
| { | ||
| "type": "section", | ||
| "text": { | ||
| "type": "mrkdwn", | ||
| "text": `현재 *${LIMIT_HOURS}시간* 이상 대기 중인 PR이 *${delayedPrs.length}건* 있습니다.` | ||
| } | ||
| }, | ||
| {"type": "divider"} | ||
| ] | ||
| }; | ||
|
|
||
| // 지연 PR 하나씩 메시지 추가 | ||
| delayedPrs.forEach((pr, index) => { | ||
| message.blocks.push({ | ||
| "type": "section", | ||
| "text": { | ||
| "type": "mrkdwn", | ||
| "text": `*${index + 1}. <${pr.url}|${pr.title}>*\n` + | ||
| `⏳ *${pr.hours}시간* 경과\n` + | ||
| `👤 작성자: ${pr.author}\n` + | ||
| `👀 리뷰어: ${pr.reviewers}` | ||
| } | ||
| }); | ||
| message.blocks.push({"type": "divider"}); | ||
| }); | ||
|
|
||
| const response = await fetch(WEBHOOK_URL, { | ||
| method: 'POST', | ||
| headers: {'Content-Type': 'application/json'}, | ||
| body: JSON.stringify(message) | ||
| }); | ||
|
|
||
| if (!response.ok) { | ||
| throw new Error(`Slack 전송 실패 Status: ${response.status}`); | ||
| } | ||
|
|
||
| } catch (error) { | ||
| core.setFailed(`❌ 스크립트 실행 중 에러 발생: ${error.message}`); | ||
| } | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.