Addition of Automatic Review Configuration for GitHub App #215
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.
PR Type:
Enhancement
PR Description:
This pull request introduces an automatic review feature for the GitHub app. The
auto_review
command is added for an "opened" or "created" action for a pull request. This command triggers the PRReviewer to automatically review the pull request. The automatic review feature can be enabled or disabled through the settings. Additional logging has been added to provide more context when processing requests.PR Main Files Walkthrough:
pr_agent/agent/pr_agent.py
: Added the "auto_review" command to the command2class dictionary. This command triggers the PRReviewer. Also, added more logging to provide additional context when processing requests.pr_agent/servers/github_app.py
: Changed the command from "/review" to "/auto_review" in the handle_request function. This change triggers the automatic review when a pull request is opened or created.pr_agent/tools/pr_reviewer.py
: Added a new parameter "is_auto" to the PRReviewer class to indicate whether the review is automatic. If the automatic review is enabled in the settings and the review is automatic, the PRReviewer will review the pull request.pr_agent/settings/configuration.toml
: Added a new setting "automatic_review" to enable or disable the automatic review feature.