|
| 1 | +# 🤝 Contributing to `gitc` |
| 2 | + |
| 3 | +Thank you for your interest in contributing to **`gitc`** — an AI-powered CLI tool for generating commit messages from your git diffs. |
| 4 | + |
| 5 | +We welcome all types of contributions, whether you're fixing bugs, suggesting features, improving documentation, or writing tests. |
| 6 | + |
| 7 | + |
| 8 | +## 📌 Table of Contents |
| 9 | +* [Code of Conduct](#-code-of-conduct) |
| 10 | +* [Getting Started](#-getting-started) |
| 11 | +* [Development Setup](#-development-setup) |
| 12 | +* [Making Contributions](#-making-contributions) |
| 13 | +* [Commit Message Guidelines](#-commit-message-guidelines) |
| 14 | +* [Pull Request Process](#-pull-request-process) |
| 15 | +* [Feature Suggestions & Bugs](#-feature-suggestions--bugs) |
| 16 | + |
| 17 | +## 📜 Code of Conduct |
| 18 | +We follow a [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). Please treat everyone respectfully and kindly. |
| 19 | + |
| 20 | +## ⚙️ Getting Started |
| 21 | +1. **Fork** the repository. |
| 22 | +2. **Clone** your fork locally: |
| 23 | + ```bash |
| 24 | + git clone https://github.com/<your-username>/gitc.git |
| 25 | + cd gitc |
| 26 | + ``` |
| 27 | +3. Create a new branch: |
| 28 | + ```bash |
| 29 | + git checkout -b feature/my-feature |
| 30 | + ``` |
| 31 | + |
| 32 | +## 🛠 Development Setup |
| 33 | + Make sure you have: |
| 34 | + * Go ≥ **1.18** |
| 35 | + * Git |
| 36 | + * (Optional) OpenAI API Key for testing |
| 37 | + |
| 38 | + Install dependencies: |
| 39 | + ```bash |
| 40 | + go mod tidy |
| 41 | + ``` |
| 42 | + |
| 43 | +Build the project: |
| 44 | + ```bash |
| 45 | + go build -o gitc ./cmd/gitc |
| 46 | + ``` |
| 47 | + |
| 48 | +Run the tool: |
| 49 | + ```bash |
| 50 | + ./gitc --help |
| 51 | + ``` |
| 52 | + |
| 53 | +Run tests: |
| 54 | + ```bash |
| 55 | + go test ./... |
| 56 | + ``` |
| 57 | + |
| 58 | +## ✍️ Making Contributions |
| 59 | +You can contribute in the following ways: |
| 60 | + * 🐛 Bug Fixes |
| 61 | + * 📄 Documentation Improvements |
| 62 | + * 🚀 New Features |
| 63 | + * ✅ Tests and Coverage |
| 64 | + * 💡 Suggesting Ideas and Discussions |
| 65 | + |
| 66 | +If unsure, [open a discussion](https://github.com/rezatg/gitc/discussions) or [create an issue](https://github.com/rezatg/gitc/issues) before starting work. |
| 67 | + |
| 68 | +## 🧾 Commit Message Guidelines |
| 69 | +We follow [Conventional Commits](https://www.conventionalcommits.org) to ensure readable, semantic commit history. |
| 70 | + |
| 71 | +Example: |
| 72 | + ```bash |
| 73 | + feat(config): add support for Gemini provider |
| 74 | + fix(cli): handle missing config gracefully |
| 75 | + docs(readme): update installation instructions |
| 76 | + ``` |
| 77 | + |
| 78 | +> You can even use `gitc` itself to generate commit messages: |
| 79 | + ```bash |
| 80 | + gitc -a --commit-type feat |
| 81 | + ``` |
| 82 | + |
| 83 | +## 🚀 Pull Request Process |
| 84 | +sure your PR targets the `main` branch. |
| 85 | + 2. Make sure all tests pass. |
| 86 | + 3. Write a meaningful title and description. |
| 87 | + 4. Link related issues (e.g., `Closes #42`). |
| 88 | + 5. Add relevant labels if possible. |
| 89 | + 6. Wait for code review and address feedback. |
| 90 | + |
| 91 | +## 💡 Feature Suggestions & Bugs |
| 92 | +* 💬 Found a bug? [Open an issue](https://github.com/rezatg/gitc/issues) |
| 93 | +* 💡 Have a feature idea? [Start a discussion](https://github.com/rezatg/gitc/discussions) |
| 94 | +* 🙌 Want to help but don’t know where to start? Look for [good first issues](https://github.com/rezatg/gitc/labels/good%20first%20issue) |
| 95 | + |
| 96 | +## 🫶 Thank You! |
| 97 | +Your time, effort, and ideas make `gitc` better. We're thrilled to have you here 🙌 |
0 commit comments