diff --git a/.claude/commands/pr-merge.md b/.claude/commands/pr-merge.md new file mode 100644 index 0000000..ea45f37 --- /dev/null +++ b/.claude/commands/pr-merge.md @@ -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 --watch`. + - If any check fails, print the failing check and **stop — do not merge.** +4. Merge: `gh pr merge --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/`). + +## 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. diff --git a/CLAUDE.md b/CLAUDE.md index 85418da..abdb62d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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가 함.