Merged
Conversation
- Add thiserror-based error types in src/errors.rs with specific variants - Replace string-based errors with typed GhrError across all modules - Eliminate .netrc parsing duplication in auth.rs by extracting helper functions - Update all error handling to use automatic conversions via From trait - Fix test assertions to work with new error types - All 27 tests passing, clippy clean 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Priority 2 improvements: - Extract hardcoded values to src/constants.rs (API endpoints, headers, defaults) - Replace std::fs with tokio::fs for non-blocking file operations - Replace std::process with tokio::process for async git commands - Add exponential backoff retry logic for all GitHub API calls (max 3 retries) - Update cli.rs to use constants for default values - All 27 tests passing, clippy clean 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…un, JSON output, and GitHub Enterprise support This commit implements all Priority 3 enhancements from the improvement roadmap: **New Features:** 1. Advanced Filtering Options (3.1) - Created filters module with support for glob patterns, regex, and exclusion - Smart pattern detection (regex → glob → substring priority) - Multiple filters with AND logic (comma-separated) - Examples: *.deb, linux-.*-amd64, !windows 2. JSON Output Format (3.2) - Added --format flag with table (default) and json options - Added Serialize trait to all data models - Machine-readable output for scripting and automation 3. Response Caching (3.3) - Created cache module with file-based caching (~/.cache/ghr/) - 24-hour TTL with automatic expiration - Added --cache flag to enable caching - Reduces API calls and improves performance 4. Dry-Run Mode (3.4) - Added --dry-run flag for preview mode - Shows what would be downloaded/cloned without executing - Displays asset sizes, total size, and destinations 5. GitHub Enterprise Support (3.5) - Added --api-url flag for custom API base URLs - Created _with_base variants for all endpoint builders - Created _with_cache variants for all GitHub API functions **Implementation Details:** - Added dependencies: regex (1.10), globset (0.4) - Added error types: RegexError, GlobError, JsonError - Created 2 new modules: filters.rs (122 lines), cache.rs (147 lines) - Updated 9 files: cli.rs, constants.rs, errors.rs, github.rs, main.rs, models.rs, etc. - Added 9 new tests (36 total tests, 100% pass rate) - Clippy clean (only dead_code warnings for wrapper functions) **Documentation:** - Completely updated README.md with new feature documentation - Added comprehensive examples for all new features - Enhanced CI/CD pipeline examples - Updated common use cases with new capabilities **Files Changed:** - New: src/cache.rs, src/filters.rs - Modified: Cargo.toml, README.md, src/cli.rs, src/constants.rs, src/errors.rs, src/github.rs, src/main.rs, src/models.rs - Total: +805 insertions, -98 deletions All tests passing. Ready for release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed