Contributing
We appreciate your interest in contributing to Releasaurus! This guide will help you get started with contributing to the project, whether youβre fixing bugs, adding features, improving documentation, or helping with community support.
Ways to Contribute
π Bug Reports
- Report bugs and issues you encounter
- Provide detailed reproduction steps
- Share your environment details
π‘ Feature Requests
- Suggest new language/framework support
- Propose workflow improvements
- Request platform integrations
π§ Code Contributions
- Fix bugs and implement features
- Add support for new languages
- Improve performance and reliability
π Documentation
- Improve existing documentation
- Add examples and tutorials
- Translate documentation
π― Testing
- Write and improve tests
- Test on different platforms
- Validate new features
π¬ Community Support
- Help other users in discussions
- Answer questions in issues
- Share your experience and best practices
Development Environment Setup
Prerequisites
- Rust: 1.70 or higher (Install Rust)
- Git: For version control
- A supported platform: GitHub, GitLab, or Gitea account for testing
Getting Started
-
Fork and Clone
# Fork the repository on GitHub git clone https://github.com/your-username/releasaurus.git cd releasaurus -
Install Dependencies
# Install Rust dependencies cargo build # Install development tools cargo install cargo-watch cargo install cargo-nextest # Optional: faster test runner -
Set Up Testing Environment
# Create test tokens (with minimal permissions) export GITHUB_TOKEN="ghp_test_token_here" export GITLAB_TOKEN="glpat_test_token_here" export GITEA_TOKEN="test_token_here" # Run tests cargo test -
Verify Installation
# Build and test the binary cargo build --release ./target/release/releasaurus --help
Code Contribution Guidelines
Coding Standards
Rust Style
- Use
cargo fmtfor consistent formatting - Use
cargo clippyfor linting - Write comprehensive documentation comments
Adding New Language/Framework Updaters
Releasaurus supports multiple programming languages through its updater system. Adding support for a new language requires updating several files across the codebase.
Overview
Each language updater consists of:
- ReleaseType enum variant - Configuration option in
src/config/release_type.rs - Manifests module - Defines manifest file targets in
src/updater/yourlanguage/manifests.rs - Updater module - Language-specific implementation in
src/updater/yourlanguage/updater.rs - File parsers - Version file format handlers (e.g.,
src/updater/yourlanguage/your_file_type.rs) - Tests - Comprehensive test coverage for all modules
- Documentation - User-facing documentation updates
Files to Update
1. Add ReleaseType Variant
src/config/release_type.rs- Add your language to theReleaseTypeenum
2. Create Manifests Module
src/updater/yourlanguage/manifests.rs- ImplementManifestTargetstraitsrc/updater/manager.rs- Register inrelease_type_manifest_targets()function
3. Create Updater Implementation
src/updater/yourlanguage.rs- Module declaration filesrc/updater/yourlanguage/updater.rs- ImplementPackageUpdatertraitsrc/updater/yourlanguage/your_file_type.rs- File format parser(s)src/updater.rs- Add module declarationsrc/updater/manager.rs- Register inupdater()function
4. Add Tests
- Tests in
manifests.rs- Test manifest target generation - Tests in
updater.rs- Test updater integration - Tests in file parser modules - Test version updates
5. Update Documentation
book/src/supported-languages.md- Add language sectionbook/src/configuration.md- Update ReleaseType options
Reference Implementations
Use existing language implementations as templates:
Simple Languages (Good starting points):
- PHP:
src/updater/php/- Single manifest file, straightforward JSON parsing - Python:
src/updater/python/- Multiple manifest formats (TOML, cfg, py)
Complex Languages (Advanced features):
- Node:
src/updater/node/- Workspace support, multiple lock files - Rust:
src/updater/rust/- Workspace detection, dependency updates - Java:
src/updater/java/- Multiple build tools (Maven, Gradle), properties files
Key Traits to Implement:
ManifestTargetsinmanifests.rs- Defines which files to loadPackageUpdaterinupdater.rs- Coordinates version updates
Testing Guidelines
Follow the established testing patterns:
- Test outcomes, not implementation - Verify behavior, not how itβs achieved
- Minimal and concise - Only test what provides value
- Use helper functions - Reduce duplication (see
test_helpers.rs) - Descriptive names - e.g.,
returns_all_manifest_targetsnottest_1
Example test files to reference:
src/updater/php/manifests.rs- Simple manifest testssrc/updater/node/manifests.rs- Workspace-aware manifest testssrc/updater/php/updater.rs- Basic updater tests
Running Tests
# Run all tests for your language
cargo test yourlanguage
# Run specific module tests
cargo test updater::yourlanguage::manifests
cargo test updater::yourlanguage::updater
# Test with real repository
releasaurus release-pr \
--forge local \
--repo "/path/to/test/project" \
--debug
Best Practices
- Parse robustly - Handle various file formats and edge cases
- Preserve formatting - Maintain original file structure when possible
- Log clearly - Use
info!,warn!,error!macros appropriately - Follow patterns - Study existing implementations before starting
- Write tests first - Define expected behavior through tests
Getting Help
- Review existing implementations in
src/updater/ - Check test files for usage patterns
- Ask questions in GitHub Discussions
- Reference the
PackageUpdaterandManifestTargetstrait documentation
Code of Conduct
This repository adheres the Rust Code of Conduct
Reporting
Report any unacceptable behavior to the project maintainers.
Community and Communication
Channels
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and community support
- Pull Requests: Code review and collaboration
Getting Help
- Documentation: Start with this book
- Search Issues: Check if your question has been asked
- Ask Questions: Create a discussion or issue
- Debug Mode: Use
--debugflag orRELEASAURUS_DEBUGenvironment variable for troubleshooting
Thank you for contributing to Releasaurus!