fix: batch fixes for issues #3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070 [skip ci]#408
Open
fix: batch fixes for issues #3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070 [skip ci]#408
Conversation
…, 3068, 3069, 3070 [skip ci] Issue #3061: Add Structured Error Codes for Programmatic Handling - Added ErrorCode enum with structured codes (E001-E999) organized by category - Implemented error_code() and format_with_code() methods for CortexError - Added comprehensive tests for error codes Issue #3062: Add PR Review Command for Automated Reviews - Added 'cortex pr review <number>' command with AI-powered code analysis - Support for focus areas (--focus security,performance,quality) - Support for output formats (--format markdown|json) - Option to post review as PR comment (--post) Issue #3063: Add PR Create Command - Added 'cortex pr create' command to create PRs from current branch - Auto-generate title/body from commits or provide manually - Support for draft mode, labels, and reviewers - Integration with gh CLI Issue #3064: Store GitHub Token in Configuration - Extended config_set to support github.token and github.user keys - Token can be stored securely in config.toml [github] section Issue #3065: Add GitLab Support Alongside GitHub - Created new gitlab_cmd.rs module with complete MR operations - Support for 'cortex gitlab mr checkout/review/create/list' commands - Self-hosted GitLab support via --url flag - Token storage in config: gitlab.token, gitlab.url, gitlab.user Issue #3066: Add Content Caching for Scrape Command - Added --cache flag to enable response caching - Configurable TTL with --cache-ttl (default: 3600s) - Cache stored in ~/.cache/cortex/scrape_cache/ - Hash-based cache keys for URL identification Issue #3067: Add Readability-Style Content Extraction - Added --readability flag for article content extraction - Targets semantic elements: article, main, [role=main] - Removes navigation, ads, sidebars, and boilerplate Issue #3068: Add Headless Browser Option - Added --headless flag for JavaScript-rendered pages - Added --wait-time option for JS rendering delay - Prints helpful message about browser automation setup Issue #3069: Add Sitemap-Based Bulk Scraping - Added --sitemap flag to parse sitemap.xml and scrape URLs - Configurable limit with --sitemap-limit (default: 100) - Configurable delay between requests with --sitemap-delay Issue #3070: Add Input/Output Encoding Options - Added --input-encoding for source page encoding - Added --output-encoding for result encoding (default: utf-8)
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.
Summary
This PR implements batch fixes for 10 feature requests spanning error handling improvements, PR/MR workflow enhancements, GitLab support, and web scraping capabilities.
Changes
Issue #3061: Add Structured Error Codes for Programmatic Handling
ErrorCodeenum with structured codes (E001-E999) organized by categoryerror_code()andformat_with_code()methods forCortexErrorIssue #3062: Add PR Review Command for Automated Reviews
cortex pr review <number>command with AI-powered code analysis--focus security,performance,quality)--format markdown|json)--post)Issue #3063: Add PR Create Command
cortex pr createcommand to create PRs from current branchIssue #3064: Store GitHub Token in Configuration
config_setto supportgithub.tokenandgithub.userkeysconfig.toml[github]sectionIssue #3065: Add GitLab Support Alongside GitHub
gitlab_cmd.rsmodule with complete MR operationscortex gitlab mr checkout/review/create/listcommands--urlflaggitlab.token,gitlab.url,gitlab.userIssue #3066: Add Content Caching for Scrape Command
--cacheflag to enable response caching--cache-ttl(default: 3600s)~/.cache/cortex/scrape_cache/Issue #3067: Add Readability-Style Content Extraction
--readabilityflag for article content extractionarticle,main,[role=main]Issue #3068: Add Headless Browser Option
--headlessflag for JavaScript-rendered pages--wait-timeoption for JS rendering delayIssue #3069: Add Sitemap-Based Bulk Scraping
--sitemapflag to parse sitemap.xml and scrape URLs--sitemap-limit(default: 100)--sitemap-delayIssue #3070: Add Input/Output Encoding Options
--input-encodingfor source page encoding--output-encodingfor result encoding (default: utf-8)Files Changed
cortex-engine/src/error.rs- Structured error codescortex-cli/src/pr_cmd.rs- PR review and create commandscortex-cli/src/gitlab_cmd.rs- New GitLab integration modulecortex-cli/src/scrape_cmd.rs- Caching, readability, headless, sitemap, encodingcortex-cli/src/main.rs- GitLab command registration, config key supportcortex-cli/src/lib.rs- Module declarationCloses #3061, #3062, #3063, #3064, #3065, #3066, #3067, #3068, #3069, #3070