Thank you for your interest in contributing to Commit-AI!
Be respectful, inclusive, and professional. We're all here to make Commit-AI better.
- Go 1.21 or higher
- Git
- Make (optional)
# Clone repository
git clone https://github.com/NeelFrostrain/Commit-Ai.git
cd Commit-Ai
# Install dependencies
go mod download
# Build
make build
# Run tests
make testgit checkout -b feature/your-feature-name- Write clean, idiomatic Go code
- Follow existing code style
- Add tests for new functionality
- Update documentation
# Run tests
make test
# Run with coverage
make test-coverage
# Run linter
make lint
# Format code
make fmt# Use Commit-AI to generate commit message
commit-ai -c
# Or manually commit
git commit -m "feat(module): description"git push origin feature/your-feature-nameThen create a Pull Request on GitHub.
- Follow Effective Go
- Use
gofmtfor formatting - Use
golintfor linting - Write clear, descriptive variable names
- Add comments for exported functions
// ParseResponse extracts title and report from AI response
func ParseResponse(response string) (string, string) {
// Implementation
}func TestMyFunction(t *testing.T) {
// Arrange
input := "test"
// Act
result := MyFunction(input)
// Assert
if result != "expected" {
t.Errorf("Expected 'expected', got '%s'", result)
}
}# Run all tests
make test
# Run specific test
go test -run TestMyFunction ./internal/ai
# Run with coverage
make test-coverage- Aim for 85%+ coverage
- Test edge cases
- Test error conditions
- Update relevant
.mdfiles indocs/ - Update README.md if needed
- Add examples if applicable
- Keep documentation up-to-date
- Use clear, concise language
- Include code examples
- Add links to related docs
- Use proper markdown formatting
Follow Conventional Commits:
type(scope): description
CATEGORY:
- Detailed change 1
- Detailed change 2
TECHNICAL DETAILS:
- Files changed: X files
- Key changes: description
IMPACT:
- Impact 1
- Impact 2
feat: New featurefix: Bug fixdocs: Documentationstyle: Code stylerefactor: Code refactoringperf: Performance improvementtest: Testschore: Maintenance
feat(ai): improve prompt engineering for better analysis
IMPROVEMENTS:
- Enhanced AI prompt with critical instructions
- Added warnings against generic features
- Improved prompt clarity
TECHNICAL DETAILS:
- 1 file changed: 50 insertions(+), 20 deletions(-)
IMPACT:
- Better commit message accuracy
- Improved developer experience
- ✅ Tests pass:
make test - ✅ Code formatted:
make fmt - ✅ Linter passes:
make lint - ✅ Documentation updated
- ✅ Commit messages follow format
Include:
- What: What does this PR do?
- Why: Why is this change needed?
- How: How does it work?
- Testing: How was it tested?
- Related: Related issues or PRs
## What
Adds emoji support to commit messages
## Why
Improves commit history readability and visual appeal
## How
- Added `-e/--emoji` flag
- Enhanced AI prompt with emoji instructions
- Updated validation to accept emoji-prefixed commits
## Testing
- Tested with various commit types
- Verified emoji display in different terminals
- All tests passing
## Related
Closes #123- Maintainers will review your PR
- Provide feedback and suggestions
- Request changes if needed
- Approve when ready
- Make requested changes
- Commit with descriptive message
- Push changes
- Request re-review
Include:
- Version:
commit-ai version - System:
uname -a - Error: Full error message
- Steps: How to reproduce
- Expected: What should happen
- Actual: What actually happened
Include:
- Description: What feature?
- Use Case: Why is it needed?
- Example: How would it work?
- Alternative: Any alternatives?
- Bug fixes
- Performance improvements
- New features
- Code refactoring
- Test coverage
- Improve existing docs
- Add new guides
- Fix typos
- Add examples
- Translate docs
- Answer questions
- Help with issues
- Share feedback
- Promote project
# Build
make build
# Build production
make build-prod
# Run tests
make test
# Generate coverage
make test-coverage
# Format code
make fmt
# Run linter
make lint
# Run all checks
make check
# Clean build artifacts
make clean# Run with verbose output
./commit-ai -v
# Run with specific model
./commit-ai -m llama-3.1-70b-versatile
# Check configuration
echo $GROQ_API_KEY# Build locally
make build
# Test with real git repo
cd /tmp
mkdir test-repo
cd test-repo
git init
echo "test" > file.txt
git add .
/path/to/commit-ai -vFollow Semantic Versioning:
- MAJOR: Breaking changes
- MINOR: New features
- PATCH: Bug fixes
- Update version in code
- Update CHANGELOG.md
- Create git tag
- Build release binaries
- Create GitHub release
- Upload binaries
- GitHub Issues: https://github.com/NeelFrostrain/Commit-Ai/issues
- GitHub Discussions: https://github.com/NeelFrostrain/Commit-Ai/discussions
- Documentation: https://github.com/NeelFrostrain/Commit-Ai/tree/main/docs
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to Commit-AI! 🎉