Skip to content

🚀 PR-Agent (Qodo Merge open-source): An AI-Powered 🤖 Tool for Automated Pull Request Analysis, Feedback, Suggestions and More! 💻🔍

License

Notifications You must be signed in to change notification settings

qodo-ai/pr-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo
PR-Agent aims to help efficiently review and handle pull requests, by providing AI feedback and suggestions

Static Badge Static Badge Static Badge Discord GitHub

  • See the Installation Guide for instructions on installing PR-Agent on different platforms.

  • See the Usage Guide for instructions on running PR-Agent tools via different interfaces, such as CLI, PR Comments, or by automatically triggering them when a new PR is opened.

  • See the Tools Guide for a detailed description of the different tools, and the available configurations for each tool.

Table of Contents

News and Updates

Jan 2, 2025

New tool /Implement (💎), which converts human code review discussions and feedback into ready-to-commit code changes.

Jan 1, 2025

Update logic and documentation for running local models via Ollama.

December 30, 2024

Following feedback from the community, we have addressed two vulnerabilities identified in the open-source PR-Agent project. The fixes are now included in the newly released version (v0.26), available as of today.

December 25, 2024

The review tool previously included a legacy feature for providing code suggestions (controlled by '--pr_reviewer.num_code_suggestion'). This functionality has been deprecated. Use instead the improve tool, which offers higher quality and more actionable code suggestions.

December 2, 2024

Open-source repositories can now freely use Qodo Merge, and enjoy easy one-click installation using a marketplace app.

See here for more details about installing Qodo Merge for private repositories.

November 18, 2024

A new mode was enabled by default for code suggestions - --pr_code_suggestions.focus_only_on_problems=true:

  • This option reduces the number of code suggestions received
  • The suggestions will focus more on identifying and fixing code problems, rather than style considerations like best practices, maintainability, or readability.
  • The suggestions will be categorized into just two groups: "Possible Issues" and "General".

Still, if you prefer the previous mode, you can set --pr_code_suggestions.focus_only_on_problems=false in the configuration file.

Example results:

Original mode

Focused mode

Overview

Supported commands per platform:

GitHub GitLab Bitbucket Azure DevOps
TOOLS Review
Describe
Improve
Ask
Ask on code lines
Update CHANGELOG
Ticket Context 💎
Utilizing Best Practices 💎
PR Chat 💎
Suggestion Tracking 💎
CI Feedback 💎
PR Documentation 💎
Custom Labels 💎
Analyze 💎
Similar Code 💎
Custom Prompt 💎
Test 💎
Implement 💎
USAGE CLI
App / webhook
Tagging bot
Actions
CORE PR compression
Adaptive and token-aware file patch fitting
Multiple models support
Local and global metadata
Dynamic context
Self reflection
Static code analysis 💎
Global and wiki configurations 💎
PR interactive actions 💎
Impact Evaluation 💎
  • 💎 means this feature is available only in Qodo-Merge

Auto Description (/describe): Automatically generating PR description - title, type, summary, code walkthrough and labels.
Auto Review (/review): Adjustable feedback about the PR, possible issues, security concerns, review effort and more.
Code Suggestions (/improve): Code suggestions for improving the PR.
Question Answering (/ask ...): Answering free-text questions about the PR.
Update Changelog (/update_changelog): Automatically updating the CHANGELOG.md file with the PR changes.
Find Similar Issue (/similar_issue): Automatically retrieves and presents similar issues.
Add Documentation 💎 (/add_docs): Generates documentation to methods/functions/classes that changed in the PR.
Generate Custom Labels 💎 (/generate_labels): Generates custom labels for the PR, based on specific guidelines defined by the user.
Analyze 💎 (/analyze): Identify code components that changed in the PR, and enables to interactively generate tests, docs, and code suggestions for each component.
Test 💎 (/test): Generate tests for a selected component, based on the PR code changes.
Custom Prompt 💎 (/custom_prompt): Automatically generates custom suggestions for improving the PR code, based on specific guidelines defined by the user.
Generate Tests 💎 (/test component_name): Generates unit tests for a selected component, based on the PR code changes.
CI Feedback 💎 (/checks ci_job): Automatically generates feedback and analysis for a failed CI job.
Similar Code 💎 (/find_similar_component): Retrieves the most similar code components from inside the organization's codebase, or from open-source code.
Implement 💎 (/implement): Generates implementation code from review suggestions.


Example results




Try it now

Try the GPT-4 powered PR-Agent instantly on your public GitHub repository. Just mention @CodiumAI-Agent and add the desired command in any PR comment. The agent will generate a response based on your command. For example, add a comment to any pull request with the following text:

@CodiumAI-Agent /review

and the agent will respond with a review of your PR.

Note that this is a promotional bot, suitable only for initial experimentation. It does not have 'edit' access to your repo, for example, so it cannot update the PR description or add labels (@CodiumAI-Agent /describe will publish PR description as a comment). In addition, the bot cannot be used on private repositories, as it does not have access to the files there.

Review generation process

To set up your own PR-Agent, see the Installation section below. Note that when you set your own PR-Agent or use Qodo hosted PR-Agent, there is no need to mention @CodiumAI-Agent .... Instead, directly start with the command, e.g., /ask ....


Qodo Merge 💎

Qodo Merge is a hosted version of PR-Agent, provided by Qodo. It is available for a monthly fee, and provides the following benefits:

  1. Fully managed - We take care of everything for you - hosting, models, regular updates, and more. Installation is as simple as signing up and adding the Qodo Merge app to your GitHub\GitLab\BitBucket repo.
  2. Improved privacy - No data will be stored or used to train models. Qodo Merge will employ zero data retention, and will use an OpenAI account with zero data retention.
  3. Improved support - Qodo Merge users will receive priority support, and will be able to request new features and capabilities.
  4. Extra features -In addition to the benefits listed above, Qodo Merge will emphasize more customization, and the usage of static code analysis, in addition to LLM logic, to improve results. See here for a list of features available in Qodo Merge.

How it works

The following diagram illustrates PR-Agent tools and their flow:

PR-Agent Tools

Check out the PR Compression strategy page for more details on how we convert a code diff to a manageable LLM prompt

Why use PR-Agent?

A reasonable question that can be asked is: "Why use PR-Agent? What makes it stand out from existing tools?"

Here are some advantages of PR-Agent:

  • We emphasize real-life practical usage. Each tool (review, improve, ask, ...) has a single GPT-4 call, no more. We feel that this is critical for realistic team usage - obtaining an answer quickly (~30 seconds) and affordably.
  • Our PR Compression strategy is a core ability that enables to effectively tackle both short and long PRs.
  • Our JSON prompting strategy enables to have modular, customizable tools. For example, the '/review' tool categories can be controlled via the configuration file. Adding additional categories is easy and accessible.
  • We support multiple git providers (GitHub, Gitlab, Bitbucket), multiple ways to use the tool (CLI, GitHub Action, GitHub App, Docker, ...), and multiple models (GPT-4, GPT-3.5, Anthropic, Cohere, Llama2).

Data privacy

Self-hosted PR-Agent

Qodo-hosted Qodo Merge 💎

  • When using Qodo Merge 💎, hosted by Qodo, we will not store any of your data, nor will we use it for training. You will also benefit from an OpenAI account with zero data retention.

  • For certain clients, Qodo-hosted Qodo Merge will use Qodo’s proprietary models — if this is the case, you will be notified.

  • No passive collection of Code and Pull Requests’ data — Qodo Merge will be active only when you invoke it, and it will then extract and analyze only data relevant to the executed command and queried pull request.

Qodo Merge Chrome extension

  • The Qodo Merge Chrome extension serves solely to modify the visual appearance of a GitHub PR screen. It does not transmit any user's repo or pull request code. Code is only sent for processing when a user submits a GitHub comment that activates a PR-Agent tool, in accordance with the standard privacy policy of Qodo-Merge.

Links

Join our Discord community

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy