Thank you for your interest in contributing to Viewyard! This document provides guidelines and information for contributors.
- Clone the repository
git clone https://github.com/dheater/viewyard.git
cd viewyard- Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env- Install dependencies
# GitHub CLI (required for testing)
brew install gh # macOS
# or follow instructions at https://cli.github.com/
# Authenticate with GitHub CLI
gh auth login- Build and test
cargo build
cargo test
cargo run -- --helpviewyard/
├── src/
│ ├── main.rs # Main entry point and CLI handling
│ ├── commands/
│ │ └── workspace.rs # Workspace commands (status, commit-all, etc.)
│ ├── error_handling.rs # Consolidated error handling and recovery guidance
│ ├── git.rs # Git operations wrapper
│ ├── github.rs # GitHub API integration
│ ├── interactive.rs # Interactive repository selection
│ ├── models.rs # Data structures
│ ├── search.rs # Repository search and filtering
│ └── ui.rs # User interface utilities
├── tests/ # Integration tests
├── Cargo.toml # Rust dependencies and metadata
└── README.md # Project documentation
# Run all tests
cargo test
# Run specific test
cargo test test_name
# Run tests with output
cargo test -- --nocapture
# Run integration tests only
cargo test --test integration_tests- Unit tests: Test individual functions and modules
- Integration tests: Test command-line interface and workflows
- Real workflow tests: Test actual git operations (requires setup)
- Add unit tests in the same file as the code being tested
- Add integration tests in the
tests/directory - Use descriptive test names that explain what is being tested
- Include both positive and negative test cases
- Search existing issues to avoid duplicates
- Test with latest version to ensure bug still exists
- Gather information about your environment
**Description**
A clear description of the bug.
**Steps to Reproduce**
1. Run command: `viewyard ...`
2. Expected behavior: ...
3. Actual behavior: ...
**Environment**
- OS: [e.g., macOS 12.0, Ubuntu 20.04]
- Viewyard version: [e.g., 0.2.0]
- GitHub CLI version: [e.g., 2.0.0]
- Git version: [e.g., 2.30.0]
**Additional Context**
Any additional information that might be helpful.- Check existing issues for similar requests
- Consider the scope - does it fit Viewyard's goals?
- Think about implementation - how would it work?
**Problem Statement**
What problem does this feature solve?
**Proposed Solution**
How should this feature work?
**Alternatives Considered**
What other approaches did you consider?
**Additional Context**
Any additional information or examples.- Major architectural changes: Core design is stable
- New commands: Focus is on simplicity and core functionality
- Complex features: Prefer simple, focused solutions
REQUIRED: All commits must use conventional commit format.
- Use conventional commits:
feat:,fix:,docs:,test:,style:,refactor:,perf:,chore: - Be descriptive: Explain what and why, not just what
- Reference issues: Include issue numbers when relevant
Supported types:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, missing semicolons, etc.)refactor:- Code refactoring without changing functionalityperf:- Performance improvementstest:- Adding or updating testschore:- Maintenance tasks, dependency updates
Example:
feat: add rebase conflict detection
Detect when git rebase fails due to conflicts and provide
specific recovery instructions to help users resolve issues.
Fixes #123
I am not accepting PRs at this time. Please create an issue. Providing a patch in the issue is welcome.
- Data Safety: Ensuring operations are atomic and safe
- Error Handling: Providing clear, actionable error messages
- User Experience: Making the tool intuitive and helpful
- Performance: Keeping operations fast and efficient
- Validate inputs: Always validate user inputs and external data
- Handle credentials safely: Never log or expose credentials
- Use safe defaults: Choose secure options by default
- Minimize permissions: Request only necessary permissions
- Be respectful: Treat all contributors with respect
- Be inclusive: Welcome contributors from all backgrounds
- Be constructive: Provide helpful feedback and suggestions
- Be patient: Remember that everyone is learning