|
| 1 | +# Contributing to GitGlimpse |
| 2 | + |
| 3 | +## Setup |
| 4 | + |
| 5 | +```bash |
| 6 | +pnpm install |
| 7 | +pnpm build |
| 8 | +pnpm test |
| 9 | +``` |
| 10 | + |
| 11 | +Node.js ≥ 20 and pnpm are required. For integration tests you also need FFmpeg and Playwright Chromium: |
| 12 | + |
| 13 | +```bash |
| 14 | +sudo apt-get install -y ffmpeg # Linux |
| 15 | +brew install ffmpeg # macOS |
| 16 | +pnpm --filter @git-glimpse/core exec playwright install chromium --with-deps |
| 17 | +``` |
| 18 | + |
| 19 | +## Repo structure |
| 20 | + |
| 21 | +``` |
| 22 | +packages/ |
| 23 | + core/ — Core library: diff analysis, trigger logic, script generation, recording, publishing |
| 24 | + action/ — GitHub Action wrapper (main action + check-trigger companion) |
| 25 | + cli/ — CLI for local use (`npx git-glimpse`) |
| 26 | +check-trigger/ — Lightweight companion action for early trigger evaluation |
| 27 | +examples/ — Example project configurations |
| 28 | +tests/ — Integration and unit tests |
| 29 | +``` |
| 30 | + |
| 31 | +## Running tests |
| 32 | + |
| 33 | +```bash |
| 34 | +pnpm test # unit tests (fast, no external deps) |
| 35 | +pnpm run test:integration # Playwright + FFmpeg (no API key needed) |
| 36 | +pnpm run test:llm # full pipeline with real LLM (requires ANTHROPIC_API_KEY) |
| 37 | +``` |
| 38 | + |
| 39 | +## Making changes |
| 40 | + |
| 41 | +- **Core logic** lives in `packages/core/src/` |
| 42 | +- **Action entrypoint** is `packages/action/src/index.ts` |
| 43 | +- **Check-trigger entrypoint** is `packages/action/src/check.ts` |
| 44 | +- After changing action source, rebuild the dist: `pnpm build` in `packages/action` |
| 45 | + |
| 46 | +## Branching |
| 47 | + |
| 48 | +- Features: `feat/<name>` |
| 49 | +- Bug fixes: `fix/<name>` |
| 50 | +- Releases: `release/v<version>` |
| 51 | + |
| 52 | +## Submitting a PR |
| 53 | + |
| 54 | +1. Fork the repo and create a branch from `main` |
| 55 | +2. Make your changes with tests where applicable |
| 56 | +3. Run `pnpm test` and confirm everything passes |
| 57 | +4. Open a PR with a clear description of what changed and why |
| 58 | + |
| 59 | +## Reporting issues |
| 60 | + |
| 61 | +Please include: |
| 62 | +- What you expected to happen |
| 63 | +- What actually happened |
| 64 | +- Your `git-glimpse.config.ts` (redact any secrets) |
| 65 | +- The GitHub Actions log output if relevant |
0 commit comments