Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .claude/commands/pr-merge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
description: Wait for CI to pass on a PR, then merge it per the branch workflow and clean up
---

Merge a pull request once CI is green, following popol's branch workflow.

Usage: `/pr-merge [pr-number]` — if no number given, use the current branch's open PR.

## Branch workflow (see CLAUDE.md)
- feature → develop: **squash**
- develop → main: **merge commit** (squashing develop→main permanently diverges the branches)

## Steps
1. Resolve the PR number: use `$ARGUMENTS` if given, else `gh pr view --json number,baseRefName,headRefName,title`.
2. Print the PR title, head → base. Determine the merge method from the base:
- base is `develop` (a feature PR) → `--squash`
- base is `main` (a develop→main integration) → `--merge`
3. Wait for checks: `gh pr checks <n> --watch`.
- If any check fails, print the failing check and **stop — do not merge.**
4. Merge: `gh pr merge <n> <method> --delete-branch` (omit `--delete-branch` when head is `develop`).
5. Report: PR number, method used, and the resulting base-branch HEAD (`git fetch && git log --oneline -1 origin/<base>`).

## Notes
- Do not force-push or bypass the required `test` status check.
- The repo working dir may be shared with a concurrent process — re-check `git status`/HEAD before any local git operation.
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@
### Env vars (Vercel Project → Settings → Environment Variables) — 모두 선택
- FINNHUB_API_KEY (optional — valuation badges PER/PSR/PBR/ROE)
- FRED_API_KEY (optional — 10yr yield / HY spread)
- GOOGLE_SITE_VERIFICATION (optional — Search Console HTML-tag 인증. URL 접두어 속성 사용; vercel.app 서브도메인은 DNS 인증 불가)
# 검색·시세·RSI·매수존·환율·공포지수는 키 없이 동작. 구글 시트 더 이상 사용 안 함.

## CI (`.github/workflows/ci.yml`)
- PR + main/develop push 시 `npm ci → npm test → npm run build` 실행. 품질 게이트 전용 — **배포 안 함**(배포는 Vercel 담당).
- main·develop 브랜치 보호: `test` 체크 통과해야 머지 가능.
- 로컬에서 `npm run build` 금지 권장 — 실행 중인 `next dev`의 `.next`를 깨뜨려 dev 서버가 500을 냄. 빌드는 CI가 함.
Loading