Comparing CodiumAI PR-Agent to GitHub Copilot's solution for pull request
Tags: codiumai, ai, git, github
Published: 2023-12-18 20:09:35

In the software development field, [pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)(PRs) play a crucial role in fostering collaboration. However, it’s not uncommon for us to overlook essential tasks before submitting a pull request. This oversight can result in rejection - whether due to unclear and lengthy descriptions or the omission of test cases for code updates. Code reviews, though vital, often consume a considerable amount of time. For developers, this can become a [daunting experience](https://dev.to/pragyanatvade/6-differences-you-must-know-between-a-good-pull-request-pr-vs-a-bad-pull-request-pr-5fho), especially when they are maintaining larger projects with multiple contributors. But what if there was a way to speed up the pull request process? In this article, we will compare two tools that have the potential to speed up pull request processes. We will explore the features and capabilities of both tools.
 

## CodiumAI PR Agent
CodiumAI PR-Agent is an AI tool that automates the PR review process. It can track your [changeset](https://en.wikipedia.org/wiki/Changeset#:~:text=A%20changeset%20describes%20the%20exact,set%2C%20by%20version%20control%20systems.) and provides comprehensive reviews before you create a pull request. 

This tool can be integrated into your code editor and git provider(GitHub, GitLab, etc.) environment. 

As a developer, this tool is valuable when creating a PR. It helps communicate the changes made to other developers and ensures that updates and test cases are not brittle.

As a maintainer, you can use this tool to review changes and provide feedback before merging them into the codebase.

## Usage
To start using CodiumAI PR-Agent. You can install it on your [IDE](https://en.m.wikipedia.org/wiki/Integrated_development_environment) or initiate it on GitHub by using the @CodiumAI-Agent command. If you are the one reviewing the PR you might want to use it on your git provider and if you are the one making a PR you might want to use it on your IDE. 
To install it on your IDE or git provider, click [here](https://www.codium.ai/products/git-plugin/). 
Now that you are done installing it, let us discuss its features.

### PR-Agent Features

![Image of CodiumAI commands](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cw39nn4mh7ao81m80zzr.png)
The PR-Agent offers a range of advanced features, designed to elevate your pull request process. PR-Agent supports a variety of commands. You can check out an example demo [here](https://github.com/praise002/test-pr/pull/2).

#### /describe

![Image of the describe command in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o73f8mb7rd5jf48b27sh.png)

With this command, PR-Agent retrieves the title, type(label), description, and main files walkthrough of the changeset ensuring that the essential details are captured accurately.

#### /ask

![Image of the ask command in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e6jwehqca8sm14avncwx.png)

PR-Agent allows you to ask questions related to the changeset in your code. 

#### /review


![Image of review command in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dxhfe341xjcyk0yu957s.png)

![Image of review command in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/30iu4b54qjf360hhccam.png)

PR-Agent conducts a comprehensive review of the changeset, including code quality, potential bugs, and improvement suggestions. It ensures that your changeset is polished before submission. 

#### /improve

![Image of the improve command in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5hve2reednfrlyzerzkd.png)

![Image of the improve command in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/imjdvy01wc1r5cr05g6n.png)

![Image of the improve command in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9bcyf7x7hbalujyfudah.png)

PR-Agent provides code improvements focused on the changeset, contributing to overall code quality.

#### /add_doc


![Image of add_docs command in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cijwfc75or4p0qixnq47.png)

![Image of add_docs command in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4qjv4g2kc0uvhxiq4w24.png)

When invoked, this command automatically creates a docstring. This enhances the readability of your codebase and is valuable for anyone working with or contributing to the project.

In addition to these features, PR-Agent offers:

- IDE integration: Seamlessly incorporate PR-Agent into your integrated development environment([IDE](https://www.codium.ai/install/)) such as (Vs Code, IntelliJ, WebStorm, CLion, JetBrains, Pycharm, etc).
- Support multiple git providers such as (GitHub, Gitlab, Bitbucket, CodeCommit).
- Support for all major programming languages.
- Multiple ways to use the tool(CLI, GitHub Action, GitHub App, Docker, etc).
- Multiple [models](https://github.com/Codium-ai/pr-agent/pull/172) (GPT-4, GPT-3.5, Anthropic, Cohere, Llama2).
To learn more, click [here](https://github.com/Codium-ai/pr-agent#installation).

## GitHub Copilot
GitHub Copilot is an AI pair programmer that simplifies the process of code writing, making it faster and more efficient. It offers a range of other capabilities. For this article, our focus will be on its pull request (PR) solution. As of writing this article, GitHub PR is still on the waitlist. Here are some of its features.

### GitHub Copilot PR Features 

- Suggestions for your pull request description.
- Identification of PR changes lacking tests, with automated suggestions for test creation.
- Real-time generation of text suggestions as you type.
- Issue resolution, code suggestion generation, and initiation of new pull requests.
- PR completion and repair functionalities
- AI-powered review and responses.

GitHub Copilot PR features from [GithubNext](https://githubnext.com/projects/copilot-for-pull-requests).

## Potential Limitations of AI-PR Agents: CodiumAI PR-Agent and GitHub Copilot PR
In exploring the potential capabilities of these tools, it’s important to know that these tools, just like every AI come with their drawbacks. 

- For instance, the automated suggestions may not always align with project requirements leading to inaccuracies in the generated code.
- The feedback might be inaccurate emphasizing the need for additional prompts to ensure precise feedback.
- It is still under development signifying ongoing refinement and improvement.

## Comparison between CodiumAI PR-Agent and Github Copilot PR

### Repository Accessibility
CodiumAI PR-Agent is open-source, allowing public access, while GitHub Copilot PR resides within a private repository.

### Cost
CodiumAI PR is free to use for individual developers but there are paid plans that offer more features. In contrast, GitHub Copilot PR requires a paid subscription.

### Platform Support
CodiumAI PR supports all Git platforms while GitHub Copilot PR is exclusive to GitHub.

### Availability
CodiumAI PR is available for use right now. On the other hand, GitHub Copilot PR is presently on a waitlist.

### Command Support
CodiumAI PR supports a variety of commands as we have seen earlier and it will support more commands in the future, whereas GitHub Copilot PR primarily supports one command.

### Large Language Model
CodiumAI PR uses multiple models while GitHub Copilot PR is powered by the OpenAI GPT-4 model.

### IDE Support
CodiumAI PR can be integrated into your IDE such as ([Vs Code](https://code.visualstudio.com/), [JetBrains IDE's](https://www.jetbrains.com/), etc). In contrast, GitHub Copilot PR can be integrated into Vs Code, Visual Studio, Neovim, and JetBrains IDEs.

## CodiumAI PR-Agent Git Solution
**Collaboration**: Aims to improve collaboration by speeding up the PR process.
**Changelog Updates**: Assists in updating changelogs with relevant information.
**Concise title and description**: Enables contributors to write concise and meaningful descriptions.
**Commit message assistance**: Generates meaningful commit messages.
**Code quality evaluation and improvement**: Analyzes code for quality, potential bugs, and improvement suggestions.
**Q&A**: Addresses contributor's questions related to the changeset.

## Conclusion
In summary, both CodiumAI PR-Agent and GitHub Copilot PR present valuable PR solutions to simplify and improve the pull request process. The choice between these tools depends on specific project requirements and preferences.

What sets CodiumAI PR-Agent apart is not just its features but also its commitment to openness and collaboration. Being an open-source solution, it enables developers globally to contribute, inspect the source code, and collectively improve the tool. This transparency not only builds trust but also fosters a community-driven approach, ensuring continuous innovation.