Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of Automatic Review Configuration for GitHub App #215

Merged
merged 1 commit into from
Aug 19, 2023

Conversation

tjwp
Copy link
Contributor

@tjwp tjwp commented Aug 16, 2023

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.

@idavidov
Copy link
Contributor

/describe

@github-actions github-actions bot changed the title Implement Automatic Review Configuration for GitHub app Addition of Automatic Review Configuration for GitHub App Aug 17, 2023
@github-actions github-actions bot added the enhancement New feature or request label Aug 17, 2023
@tjwp
Copy link
Contributor Author

tjwp commented Aug 17, 2023

@idavidov I saw you had a previous comment. I set the automatic_review=true default to preserve the existing behavior of pr-agent. I don't have a strong opinion on whether the default is true or false.

For my organization, I override the default to false and then if a repo wants to opt into automatic review they can create a .pr_agent.toml file in the repo that sets automatic_review=true.

@mrT23 mrT23 merged commit 532dfd2 into Codium-ai:main Aug 19, 2023
1 check passed
yochail pushed a commit to yochail/pr-agent that referenced this pull request Feb 11, 2024
Addition of Automatic Review Configuration for GitHub App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants