feat: comprehensive improvements across CLI, security, providers, and core#29
Merged
Conversation
The package __init__.py still had version 0.1.0 while pyproject.toml was at 0.5.0. Also adds PEP 561 py.typed marker so downstream users get proper type-checking support.
Users can now run `pr-reviewer --version` to check the installed version.
--config allows specifying a custom .pr-reviewer.yml path instead of relying on auto-detection. --verbose/-v enables debug-level logging for troubleshooting.
Unknown provider names now produce a clear warning and fall back to openai instead of silently breaking at provider creation time.
Expands SAST scanner coverage with: - SEC130: NoSQL injection (MongoDB operator injection) - SEC131: Server-Side Template Injection (SSTI) - SEC132: LDAP injection via string formatting - SEC140: Unsafe Rust blocks requiring extra review - SEC150: PHP eval/assert code injection - SEC151: PHP dynamic file inclusion (LFI/RFI)
Adds Hindi, Vietnamese, Thai, Ukrainian, Czech, and Swedish to the supported review languages, covering more developer communities.
Allows generating just a PR summary without running the full review with inline comments — useful for quick PR descriptions.
Adds pricing for Gemini 2.0 Flash Lite, Gemini 2.5 Flash/Pro stable, and Groq Llama 4 Scout/Maverick models.
Adds pricing entries for the latest Claude 4.6 model variants so cost tracking works correctly with newer model IDs.
The factory now checks for missing API keys before creating the provider and logs a clear warning with the expected env var name.
Adds a "concentration" component (0-10 pts) that flags PRs where a single file has very large changes, suggesting it should be split.
Bitbucket username and app password are now loaded from env vars (BITBUCKET_USERNAME, BITBUCKET_APP_PASSWORD) in from_env(), matching the pattern used for GitHub and GitLab tokens.
Adds .pyi, .mjs, .cjs, .kts, .cc, .cxx, .hpp, .zsh, .lua, .r, .scala, .ex, .exs, .dart, .zig, .vue, .svelte for more accurate diff statistics and file summaries.
Notification messages now show how long the review took, giving teams visibility into review performance.
Adds .env files, private keys (.pem, .key, .cert), binary files (.wasm), and static assets (images, fonts) to the default ignore list to avoid reviewing non-code files.
The --provider flag now lists all 5 supported providers and uses argparse choices for early validation instead of free text.
Expands the PR category taxonomy so LLM-assigned categories like 'style', 'perf', 'ci', and 'deps' render with proper labels.
The review engine now uses the i18n module to inject language instructions into the system prompt when review_language is not English, enabling reviews in the configured language.
Security scan results are now automatically appended to review comments when check_security is enabled, adding zero-cost regex-based vulnerability detection alongside the LLM review.
format_review_body() now accepts optional complexity_section and security_summary parameters, allowing callers to embed SAST and complexity results directly in the review comment.
The engine now estimates review cost before calling the LLM and truncates the diff if the estimate exceeds the configured cost_limit_usd, preventing surprise bills.
Retry behavior can now be tuned via config or YAML instead of being hardcoded in each provider, useful for rate-limited environments.
Adds testing/, fixtures/, mocks/, testdata/, and test-data/ to the test file patterns so security rules with exclude_test_files=True correctly skip these directories.
Adds pricing entries for the latest OpenAI reasoning models so cost tracking works correctly when using these models.
When --exit-code is passed, the CLI exits with code 1 if any critical severity issues are found, enabling CI pipelines to fail on serious code quality problems.
Adds .mjs, .cjs, .zsh, .dockerfile, .tf, .hcl extensions and Dockerfile basename detection for more accurate rule matching.
AI Code ReviewReview failed: Check the Action logs for details. |
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
Key Changes
CLI Enhancements
--version,--verbose,--config,--summary-only,--exit-codeflags--providernow validates via argparse choices (includesgoogle)Security Scanner (SAST)
Provider Updates
Config & Core
__version__synced to 0.5.0 + PEP 561py.typedmarkermax_retries,retry_base_delay)Review Quality
Test plan
pr-reviewer --versionoutputs0.5.0pr-reviewer review --provider invalidshows validation error--exit-codereturns 1 when critical issues are found--summary-onlygenerates summary without inline commentspytest tests/ -v)