First off, thank you for considering contributing to GitWizard! 🎉
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Before creating bug reports, please check the existing issues as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps which reproduce the problem
- Provide specific examples to demonstrate the steps
- Describe the behavior you observed after following the steps
- Explain which behavior you expected to see instead and why
- Include screenshots if relevant
- Include your environment details (OS, Go version, Git version)
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- Use a clear and descriptive title
- Provide a step-by-step description of the suggested enhancement
- Provide specific examples to demonstrate the steps
- Describe the current behavior and explain the behavior you expected to see instead
- Explain why this enhancement would be useful
- Fill in the required template
- Follow the Go coding style
- Include tests when adding features
- Update documentation when needed
- End all files with a newline
- Fork and clone the repository
git clone https://github.com/YOUR-USERNAME/gitwiz.git
cd gitwiz- Install dependencies
go mod download- Create a branch
git checkout -b feature/your-feature-name- Make your changes and test
go test ./...
go build -o gitwiz
./gitwiz --help- Commit your changes
git commit -m "feat: add amazing feature"We follow Conventional Commits:
feat:- A new featurefix:- A bug fixdocs:- Documentation only changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
Examples:
feat: add clipboard integration for issue references
fix: handle empty co-author list gracefully
docs: update keyboard navigation guide
-
Never use
go-gitlibrary - Always useos/execfor git operations -
Always use
exec.Command()with separate arguments:// ✅ CORRECT exec.Command("git", "commit", "-m", message) // ❌ WRONG exec.Command("sh", "-c", "git commit -m '"+message+"'")
-
Validate all user input - Email validation, control character stripping, etc.
-
Add timeouts to all external commands (2 seconds recommended)
-
No
panic()- Always handle errors gracefully
- Run
go fmtbefore committing - Run
go vetto catch common mistakes - Use meaningful variable names
- Add comments explaining "why", not "what"
- Keep functions small and focused
- Write tests for new features
- Write unit tests for new functionality
- Ensure all tests pass:
go test ./... - Test edge cases (empty input, invalid data, etc.)
- Include examples in test names:
TestExtractIssueReferences_WithJIRAFormat
- Update README.md if adding features
- Update USAGE.md with examples
- Update KEYBOARD_GUIDE.md for UI changes
- Add inline comments for complex logic
- Document security considerations
gitwiz/
├── main.go # Entry point, CLI flags
├── internal/
│ ├── git/ # Git operations (MUST use exec.Command)
│ ├── logic/ # Business logic, message building
│ └── tui/ # Terminal UI (Charm Huh)
├── scripts/ # Utility scripts
└── docs/ # Documentation
internal/git- Only git operations, must be secureinternal/logic- Pure functions, no I/Ointernal/tui- UI only, delegate logic to other packages
- All submissions require review
- CI must pass (tests, linting, build)
- At least one maintainer approval required
- Address review comments promptly
- Keep PR focused on a single feature/fix
Feel free to:
- Open an issue for discussion
- Join GitHub Discussions
- Email: itsm.zayan@gmail.com
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing! 🙏