Thank you for considering contributing to aicommit! This document outlines the development workflow and guidelines.
- Git
- Bash (4.0+)
- jq
- curl
- shellcheck (for linting)
- BATS (for testing)
-
Fork and clone the repository:
git clone https://github.com/YOUR_USERNAME/aicommit.git cd aicommit -
Install dependencies:
# Ubuntu/Debian sudo apt-get install jq curl git shellcheck # macOS brew install jq curl git shellcheck
-
Install BATS for testing:
git clone https://github.com/bats-core/bats-core.git /tmp/bats-core cd /tmp/bats-core && sudo ./install.sh /usr/local
-
Install the tool locally:
./install.sh
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes to the codebase
-
Run linter:
shellcheck aicommit install.sh scripts/*.sh -
Run tests:
./tests/run-tests.sh
-
Update documentation if needed (README.md, comments in code)
-
Update CHANGELOG.md under the
[Unreleased]section
We follow Conventional Commits:
feat:New featuresfix:Bug fixesdocs:Documentation changestest:Test additions or modificationschore:Maintenance tasksrefactor:Code refactoringstyle:Code style changes (formatting, etc.)perf:Performance improvements
Examples:
feat(changelog): add support for security section
fix(api): handle rate limiting errors gracefully
docs(readme): update installation instructions
test(commit): add tests for --no-push flag
- Update the CHANGELOG.md with your changes under
[Unreleased] - Ensure all tests pass locally
- Push your branch to your fork
- Open a Pull Request against the
mainbranch - Fill out the PR template with:
- Description of changes
- Related issues (if any)
- Testing performed
- Wait for CI checks to pass
- Address any review feedback
- Once approved, a maintainer will merge your PR
- Use 2 spaces for indentation
- Follow existing code patterns and conventions
- Add comments for complex logic
- Keep functions small and focused
- Use meaningful variable names
- Quote all variables to prevent word splitting
- Use
set -euo pipefailat the start of scripts
- Write tests for new features
- Update existing tests if behavior changes
- Test both success and failure cases
- Use descriptive test names
- Mock external dependencies (API calls, etc.)
- Check existing issues or create one to discuss the feature
- Get maintainer feedback before starting large changes
- Follow the development workflow above
- Document the feature in README.md
- Add tests for the new functionality
- Update CHANGELOG.md
Releases are automated through GitHub Actions when a version tag is pushed.
-
Ensure all desired changes are merged to
main -
Update CHANGELOG.md:
- Add entries under
[Unreleased]section - Use standard sections: Added, Changed, Deprecated, Removed, Fixed, Security
- Add entries under
-
Validate CHANGELOG:
./scripts/validate-changelog.sh
-
Create and push the release tag:
./scripts/release.sh v1.2.3
-
GitHub Actions will automatically:
- Update CHANGELOG.md (move Unreleased to versioned section)
- Create GitHub release with release notes
- Build and upload packages (deb, rpm)
- Generate checksums
- Update Homebrew formula
-
Verify the release:
- Check GitHub releases page
- Test package installations
- Verify Homebrew formula update
We follow Semantic Versioning:
MAJOR.MINOR.PATCHformat- MAJOR: Breaking changes
- MINOR: New features (backwards compatible)
- PATCH: Bug fixes (backwards compatible)
aicommit/
├── aicommit # Main script
├── install.sh # Installation script
├── README.md # User documentation
├── CHANGELOG.md # Version history
├── CONTRIBUTING.md # This file
├── LICENSE # MIT license
├── .shellcheckrc # Shellcheck configuration
├── .github/
│ └── workflows/
│ ├── ci.yml # CI pipeline
│ └── release.yml # Release automation
├── scripts/
│ ├── validate-changelog.sh # CHANGELOG validation
│ ├── prepare-release.sh # Release preparation
│ ├── extract-release-notes.sh
│ ├── release.sh # Release creation
│ ├── build-deb.sh # Debian package builder
│ ├── build-rpm.sh # RPM package builder
│ └── update-homebrew.sh # Homebrew formula updater
└── tests/
├── run-tests.sh # Test runner
├── helpers/
│ └── setup.bash # Test helpers
└── integration/
├── test_basic_commit.bats
├── test_flags.bats
└── test_changelog.bats
- Open an issue for bugs or feature requests
- Check existing issues before creating new ones
- Ask questions in issue discussions
- Review closed issues for similar problems
- Be respectful and inclusive
- Provide constructive feedback
- Focus on the code, not the person
- Help create a welcoming environment
By contributing, you agree that your contributions will be licensed under the MIT License.