First off, thank you for considering contributing to Gitbun! We are participating in GSSoC '24, and we want to make your open-source journey as smooth as possible.
To help you understand how Gitbun works before you write code, here is a breakdown of the pipeline.
Gitbun operates in 5 main stages (You can see this in src/index.ts):
- Validation (
src/git/): Checks if you are in a repo and have staged files. - Extraction (
src/git/): Pulls the diff stats (additions/deletions). - Heuristics (
src/analyzer/): Our rule-based engine. It detects thescope(folder names),type(feat, fix, refactor), and generates a baseline commit message without needing the internet. - AI Enhancement (
src/llm/): If enabled and Ollama/API is running, we pass the baseline message to an LLM to make it human-like and descriptive. - UI & Commit (
src/ui/): Prompts the user using Inquirer and executes the git command.
Please create a branch for your work. Use the following prefixes:
feat/your-feature-name(for new features)fix/bug-description(for bug fixes)docs/what-you-changed(for documentation)
You do not need to build the project every time you make a change. Use ts-node to run the code:
npm install
npm run dev
We use Vitest. Please ensure you write tests for any new analyzer rules or utility functions.
npm test
- Ensure your code is formatted and passes linting (
npm run lint). - Write a clear PR description explaining what you changed and why.
- Link the PR to an active issue (e.g., "Fixes #12").
- Wait for a maintainer to review!
If you are working on the Next.js playground (frontend/):
- All UI components are in
src/components/ui/. - Colors and themes are strictly defined in
src/styles/palette.ts. Please use these tokens (cream,steel,ink) instead of raw hex codes.