General Introduction
PR-Agent is an open source tool developed by Qodo to automate the processing of pull requests through AI technology. The tool provides automated feedback, suggestions, and analysis to help developers perform code review and merge more efficiently.PR-Agent supports multiple platforms, including GitHub, GitLab, Bitbucket, and Azure DevOps, and can be run in a variety of ways through the CLI, PR comments, or auto-trigger. Its main goal is to improve the efficiency and quality of code review and reduce manual intervention.
Function List
- Automated feedback: Provide AI-based code feedback and suggestions.
- Pull request analysis: Automatically analyze pull requests to identify potential problems.
- Multi-platform support: Compatible with GitHub, GitLab, Bitbucket, and Azure DevOps.
- Multiple operating modes: Support for triggering runs via CLI, PR comments, or automated triggers.
- Code Improvement Suggestions: Provide higher quality and actionable code improvement suggestions.
- Integration Tools: Supports a wide range of tools and configuration options to meet different needs.
Using Help
Installation process
- local installation::
- Use a Docker image:
docker pull qodo-ai/pr-agent
- Use the pip package:
pip install pr-agent
- Running the CLI from source: Clone the repository and run it!
python setup.py install
- Use a Docker image:
- GitHub Integration::
- Add the Qodo Merge app to your GitHub repository.
- configure
.pr_agent.toml
file to set the desired options.
Guidelines for use
- Running via CLI::
- Open a terminal and run
pr-agent analyze
Perform pull request analysis. - utilization
pr-agent feedback
Get AI feedback.
- Open a terminal and run
- Run through PR comments::
- Add a specific command to the pull request comment, such as
@pr-agent analyze
, triggering automatic analysis.
- Add a specific command to the pull request comment, such as
- automatic trigger::
- Configure the repository's workflow file to set the PR-Agent to run automatically on new pull requests.
Main function operation flow
- Automated feedback::
- After submitting a pull request, PR-Agent automatically analyzes the code and provides feedback.
- Developers can view detailed feedback and suggestions in PR Comments.
- Pull request analysis::
- PR-Agent scans the code, identifies potential problems and categorizes them as "possible problems" and "general recommendations".
- Developers can modify and optimize accordingly based on the feedback.
- Code Improvement Suggestions::
- utilization
pr-agent improve
command for higher quality code improvement suggestions. - PR-Agent generates code changes that can be directly committed based on code review discussions and feedback.
- utilization
With these steps, users can easily install and use PR-Agent to improve the efficiency and quality of code review.