diff --git a/README.md b/README.md index 74c4a774e..f3c9ee3ae 100644 --- a/README.md +++ b/README.md @@ -32,25 +32,21 @@ Making pull requests less painful with an AI agent ## News and Updates -### Feb 29, 2024 -- You can now use the repo's [wiki page](https://github.com/Codium-ai/pr-agent/blob/main/Usage.md#configuration-options) to set configurations for PR-Agent 💎 - - +### Jan 10, 2024 +- A new [documentation website](https://codium-ai.github.io/Docs-PR-Agent/) is now available for PR-Agent. It includes detailed information about the different tools, usage guides, and more, in an accessible and organized format. +### Jan 8, 2024 -### Feb 21, 2024 -- Added a new command, `/help`, to easily provide a list of available tools and their descriptions, and run them interactively. - - +- A new tool, [Find Similar Code](https://codium-ai.github.io/Docs-PR-Agent/tools/similar_code/) 💎 is now available. +
This tool retrieves the most similar code components from inside the organization's codebase, or from open-source code: + - +(click on the image to see an instructional video) -
+### Feb 29, 2024 +- You can now use the repo's [wiki page](https://codium-ai.github.io/Docs-PR-Agent/usage-guide/configuration_options/) to set configurations for PR-Agent 💎 -### Feb 18, 2024 -- Introducing the `CI Feedback` tool 💎. The tool automatically triggers when a PR has a failed check. It analyzes the failed check, and provides summarized logs and analysis. Note that this feature requires read access to GitHub 'checks' and 'actions'. See [here](./docs/CI_FEEDBACK.md) for more details. -- New ability - you can run `/ask` on specific lines of code in the PR from the PR's diff view. See [here](./docs/ASK.md#ask-lines) for more details. -- Introducing support for [Azure DevOps Webhooks](./Usage.md#azure-devops-webhook), as well as bug fixes and improved support for several ADO commands. + ## Overview @@ -58,74 +54,77 @@ Making pull requests less painful with an AI agent CodiumAI PR-Agent is an open-source tool to help efficiently review and handle pull requests. -- See the [Installation Guide](./INSTALL.md) for instructions on installing and running the tool on different git platforms. +- See the [Installation Guide](https://codium-ai.github.io/Docs-PR-Agent/installation/) for instructions on installing and running the tool on different git platforms. -- See the [Usage Guide](./Usage.md) for instructions on running the PR-Agent commands via different interfaces, including _CLI_, _online usage_, or by _automatically triggering_ them when a new PR is opened. +- See the [Usage Guide](https://codium-ai.github.io/Docs-PR-Agent/usage-guide/) for instructions on running the PR-Agent commands via different interfaces, including _CLI_, _online usage_, or by _automatically triggering_ them when a new PR is opened. -- See the [Tools Guide](./docs/TOOLS_GUIDE.md) for a detailed description of the different tools (tools are run via the commands). +- See the [Tools Guide](https://codium-ai.github.io/Docs-PR-Agent/tools/) for a detailed description of the different tools (tools are run via the commands). Supported commands per platform: -| | | GitHub | Gitlab | Bitbucket | Azure DevOps | -|-------|-----------------------------------------------------------------------------------------------------------------------------------------|:--------------------:|:--------------------:|:--------------------:|:--------------------:| -| TOOLS | Review | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | ⮑ Incremental | :white_check_mark: | | | | -| | ⮑ [SOC2 Compliance](https://github.com/Codium-ai/pr-agent/blob/main/docs/REVIEW.md#soc2-ticket-compliance-) 💎 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | Describe | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | ⮑ [Inline File Summary](https://github.com/Codium-ai/pr-agent/blob/main/docs/DESCRIBE.md#inline-file-summary-) 💎 | :white_check_mark: | | | | -| | Improve | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | ⮑ Extended | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | Ask | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | ⮑ [Ask on code lines](./docs/ASK.md#ask-lines) | :white_check_mark: | :white_check_mark: | | | -| | [Custom Suggestions](https://github.com/Codium-ai/pr-agent/blob/main/docs/CUSTOM_SUGGESTIONS.md) 💎 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | [Test](https://github.com/Codium-ai/pr-agent/blob/main/docs/TEST.md) 💎 | :white_check_mark: | :white_check_mark: | | :white_check_mark: | -| | Reflect and Review | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | Update CHANGELOG.md | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | Find Similar Issue | :white_check_mark: | | | | -| | [Add PR Documentation](https://github.com/Codium-ai/pr-agent/blob/main/docs/ADD_DOCUMENTATION.md) 💎 | :white_check_mark: | :white_check_mark: | | :white_check_mark: | -| | [Custom Labels](https://github.com/Codium-ai/pr-agent/blob/main/docs/DESCRIBE.md#handle-custom-labels-from-the-repos-labels-page-gem) 💎 | :white_check_mark: | :white_check_mark: | | :white_check_mark: | -| | [Analyze](https://github.com/Codium-ai/pr-agent/blob/main/docs/Analyze.md) 💎 | :white_check_mark: | :white_check_mark: | | :white_check_mark: | -| | [CI Feedback](https://github.com/Codium-ai/pr-agent/blob/main/docs/CI_FEEDBACK.md) 💎 | :white_check_mark: | | | | -| | | | | | | -| USAGE | CLI | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | App / webhook | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | Tagging bot | :white_check_mark: | | | | -| | Actions | :white_check_mark: | | :white_check_mark: | | -| | | | | | | -| CORE | PR compression | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | Repo language prioritization | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | Adaptive and token-aware file patch fitting | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | Multiple models support | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | [Static code analysis](https://github.com/Codium-ai/pr-agent/blob/main/docs/Analyze.md) 💎 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | [Global and wiki configurations](./Usage.md#configuration) 💎 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | | GitHub | Gitlab | Bitbucket | Azure DevOps | +|-------|------------------------------------------------------------------------------------------------------------------------------------------|:--------------------:|:--------------------:|:--------------------:|:--------------------:| +| TOOLS | Review | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | ⮑ Incremental | :white_check_mark: | | | | +| | ⮑ [SOC2 Compliance](https://codium-ai.github.io/Docs-PR-Agent/tools/review/#soc2-ticket-compliance) 💎 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | Describe | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | ⮑ [Inline File Summary](https://codium-ai.github.io/Docs-PR-Agent/tools/describe#inline-file-summary) 💎 | :white_check_mark: | | | | +| | Improve | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | ⮑ Extended | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | Ask | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | ⮑ [Ask on code lines](https://codium-ai.github.io/Docs-PR-Agent/tools/ask#ask-lines) | :white_check_mark: | :white_check_mark: | | | +| | [Custom Suggestions](https://codium-ai.github.io/Docs-PR-Agent/tools/custom_suggestions/) 💎 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | [Test](https://codium-ai.github.io/Docs-PR-Agent/tools/test/) 💎 | :white_check_mark: | :white_check_mark: | | :white_check_mark: | +| | Reflect and Review | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | Update CHANGELOG.md | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | Find Similar Issue | :white_check_mark: | | | | +| | [Add PR Documentation](https://codium-ai.github.io/Docs-PR-Agent/tools/documentation/) 💎 | :white_check_mark: | :white_check_mark: | | :white_check_mark: | +| | [Custom Labels](https://codium-ai.github.io/Docs-PR-Agent/tools/custom_labels/) 💎 | :white_check_mark: | :white_check_mark: | | :white_check_mark: | +| | [Analyze](https://codium-ai.github.io/Docs-PR-Agent/tools/analyze/) 💎 | :white_check_mark: | :white_check_mark: | | :white_check_mark: | +| | [CI Feedback](https://codium-ai.github.io/Docs-PR-Agent/tools/ci_feedback/) 💎 | :white_check_mark: | | | | +| | | | | | | +| USAGE | CLI | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | App / webhook | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | Tagging bot | :white_check_mark: | | | | +| | Actions | :white_check_mark: | | :white_check_mark: | | +| | | | | | | +| CORE | PR compression | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | Repo language prioritization | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | Adaptive and token-aware file patch fitting | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | Multiple models support | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | [Static code analysis](https://codium-ai.github.io/Docs-PR-Agent/core-abilities/#static-code-analysis) 💎 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | [Global and wiki configurations](https://codium-ai.github.io/Docs-PR-Agent/usage-guide/configuration_options/) 💎 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | | [PR Actions](https://www.codium.ai/images/pr_agent/pr-actions.mp4) 💎 | :white_check_mark: | | | | - 💎 means this feature is available only in [PR-Agent Pro](https://www.codium.ai/pricing/) -- Support for additional git providers is described in [here](./docs/Full_environments.md) + +[//]: # (- Support for additional git providers is described in [here](./docs/Full_environments.md)) ___ -‣ **Auto Description ([`/describe`](./docs/DESCRIBE.md))**: Automatically generating PR description - title, type, summary, code walkthrough and labels. +‣ **Auto Description ([`/describe`](https://codium-ai.github.io/Docs-PR-Agent/tools/describe/))**: Automatically generating PR description - title, type, summary, code walkthrough and labels. +\ +‣ **Auto Review ([`/review`](https://codium-ai.github.io/Docs-PR-Agent/tools/review/))**: Adjustable feedback about the PR, possible issues, security concerns, review effort and more. \ -‣ **Auto Review ([`/review`](./docs/REVIEW.md))**: Adjustable feedback about the PR, possible issues, security concerns, review effort and more. +‣ **Code Suggestions ([`/improve`](https://codium-ai.github.io/Docs-PR-Agent/tools/improve/))**: Code suggestions for improving the PR. \ -‣ **Question Answering ([`/ask ...`](./docs/ASK.md))**: Answering free-text questions about the PR. +‣ **Question Answering ([`/ask ...`](https://codium-ai.github.io/Docs-PR-Agent/tools/ask/))**: Answering free-text questions about the PR. \ -‣ **Code Suggestions ([`/improve`](./docs/IMPROVE.md))**: Code suggestions for improving the PR. +‣ **Update Changelog ([`/update_changelog`](https://codium-ai.github.io/Docs-PR-Agent/tools/update_changelog/))**: Automatically updating the CHANGELOG.md file with the PR changes. \ -‣ **Update Changelog ([`/update_changelog`](./docs/UPDATE_CHANGELOG.md))**: Automatically updating the CHANGELOG.md file with the PR changes. +‣ **Find Similar Issue ([`/similar_issue`](https://codium-ai.github.io/Docs-PR-Agent/tools/similar_issues/))**: Automatically retrieves and presents similar issues. \ -‣ **Find Similar Issue ([`/similar_issue`](./docs/SIMILAR_ISSUE.md))**: Automatically retrieves and presents similar issues. +‣ **Add Documentation 💎 ([`/add_docs`](https://codium-ai.github.io/Docs-PR-Agent/tools/documentation/))**: Generates documentation to methods/functions/classes that changed in the PR. \ -‣ **Add Documentation 💎 ([`/add_docs`](./docs/ADD_DOCUMENTATION.md))**: Generates documentation to methods/functions/classes that changed in the PR. +‣ **Generate Custom Labels 💎 ([`/generate_labels`](https://codium-ai.github.io/Docs-PR-Agent/tools/custom_labels/))**: Generates custom labels for the PR, based on specific guidelines defined by the user. \ -‣ **Generate Custom Labels 💎 ([`/generate_labels`](./docs/GENERATE_CUSTOM_LABELS.md))**: Generates custom labels for the PR, based on specific guidelines defined by the user. +‣ **Analyze 💎 ([`/analyze`](https://codium-ai.github.io/Docs-PR-Agent/tools/analyze/))**: Identify code components that changed in the PR, and enables to interactively generate tests, docs, and code suggestions for each component. \ -‣ **Analyze 💎 ([`/analyze`](./docs/Analyze.md))**: Identify code components that changed in the PR, and enables to interactively generate tests, docs, and code suggestions for each component. +‣ **Custom Suggestions 💎 ([`/custom_suggestions`](https://codium-ai.github.io/Docs-PR-Agent/tools/custom_suggestions/))**: Automatically generates custom suggestions for improving the PR code, based on specific guidelines defined by the user. \ -‣ **Custom Suggestions 💎 ([`/custom_suggestions`](./docs/CUSTOM_SUGGESTIONS.md))**: Automatically generates custom suggestions for improving the PR code, based on specific guidelines defined by the user. +‣ **Generate Tests 💎 ([`/test component_name`](https://codium-ai.github.io/Docs-PR-Agent/tools/test/))**: Generates unit tests for a selected component, based on the PR code changes. \ -‣ **Generate Tests 💎 ([`/test component_name`](./docs/TEST.md))**: Automatically generates unit tests for a selected component, based on the PR code changes. +‣ **CI Feedback 💎 ([`/checks ci_job`](https://codium-ai.github.io/Docs-PR-Agent/tools/ci_feedback/))**: Automatically generates feedback and analysis for a failed CI job. \ -‣ **CI Feedback 💎 ([`/checks ci_job`](./docs/CI_FEEDBACK.md))**: Automatically generates feedback and analysis for a failed CI job. +‣ **Similar Code 💎 ([`/find_similar_component`](https://codium-ai.github.io/Docs-PR-Agent/tools/similar_code//))**: Retrieves the most similar code components from inside the organization's codebase, or from open-source code. ___ ## Example results @@ -219,7 +218,7 @@ and the agent will respond with a review of your PR ![Review generation process](https://www.codium.ai/images/demo-2.gif) -To set up your own PR-Agent, see the [Installation](#installation) section below. +To set up your own PR-Agent, see the [Installation](https://codium-ai.github.io/Docs-PR-Agent/installation/) section below. Note that when you set your own PR-Agent or use CodiumAI hosted PR-Agent, there is no need to mention `@CodiumAI-Agent ...`. Instead, directly start with the command, e.g., `/ask ...`. --- @@ -233,32 +232,26 @@ To use your own version of PR-Agent, you first need to acquire two tokens: There are several ways to use PR-Agent: **Locally** -- [Use Docker image (no installation required)](./INSTALL.md#use-docker-image-no-installation-required) -- [Run from source](./INSTALL.md#run-from-source) +- [Use Docker image (no installation required)](https://codium-ai.github.io/Docs-PR-Agent/installation/locally/#use-docker-image-no-installation-required) +- [Run from source](https://codium-ai.github.io/Docs-PR-Agent/installation/locally/#run-from-source) **GitHub specific methods** -- [Run as a GitHub Action](./INSTALL.md#run-as-a-github-action) -- [Run as a GitHub App](./INSTALL.md#run-as-a-github-app) +- [Run as a GitHub Action](https://codium-ai.github.io/Docs-PR-Agent/installation/github/#run-as-a-github-action) +- [Run as a GitHub App](https://codium-ai.github.io/Docs-PR-Agent/installation/github/#run-as-a-github-app) **GitLab specific methods** -- [Run a GitLab webhook server](./INSTALL.md#run-a-gitlab-webhook-server) +- [Run a GitLab webhook server](https://codium-ai.github.io/Docs-PR-Agent/installation/gitlab/) **BitBucket specific methods** -- [Run as a Bitbucket Pipeline](./INSTALL.md#run-as-a-bitbucket-pipeline) +- [Run as a Bitbucket Pipeline](https://codium-ai.github.io/Docs-PR-Agent/installation/bitbucket/) ## PR-Agent Pro 💎 [PR-Agent Pro](https://www.codium.ai/pricing/) is a hosted version of PR-Agent, provided by CodiumAI. 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 PR-Agent app to your GitHub\BitBucket repo. 2. **Improved privacy** - No data will be stored or used to train models. PR-Agent Pro will employ zero data retention, and will use an OpenAI account with zero data retention. 3. **Improved support** - PR-Agent Pro 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, PR-Agent Pro will emphasize more customization, and the usage of static code analysis, in addition to LLM logic, to improve results. It has the following additional tools and features: - - [**Analyze PR components**](https://github.com/Codium-ai/pr-agent/blob/main/docs/Analyze.md) - - [**Custom Code Suggestions**](https://github.com/Codium-ai/pr-agent/blob/main/docs/CUSTOM_SUGGESTIONS.md) - - [**Tests**](https://github.com/Codium-ai/pr-agent/blob/main/docs/TEST.md) - - [**PR documentation**](https://github.com/Codium-ai/pr-agent/blob/main/docs/ADD_DOCUMENTATION.md) - - [**SOC2 compliance check**](https://github.com/Codium-ai/pr-agent/blob/main/docs/REVIEW.md#soc2-ticket-compliance-) - - [**Custom labels**](https://github.com/Codium-ai/pr-agent/blob/main/docs/DESCRIBE.md#handle-custom-labels-from-the-repos-labels-page-gem) - - [**Global configuration**](https://github.com/Codium-ai/pr-agent/blob/main/Usage.md#global-configuration-file-) +4. **Extra features** -In addition to the benefits listed above, PR-Agent Pro will emphasize more customization, and the usage of static code analysis, in addition to LLM logic, to improve results. +See [here](https://codium-ai.github.io/Docs-PR-Agent/#pr-agent-pro) for a list of features available in PR-Agent Pro. @@ -268,7 +261,7 @@ The following diagram illustrates PR-Agent tools and their flow: ![PR-Agent Tools](https://codium.ai/images/pr_agent/diagram-v0.9.png) -Check out the [PR Compression strategy](./PR_COMPRESSION.md) page for more details on how we convert a code diff to a manageable LLM prompt +Check out the [PR Compression strategy](https://codium-ai.github.io/Docs-PR-Agent/core-abilities/#pr-compression-strategy) page for more details on how we convert a code diff to a manageable LLM prompt ## Why use PR-Agent? @@ -277,7 +270,7 @@ A reasonable question that can be asked is: `"Why use PR-Agent? What makes it st 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](./PR_COMPRESSION.md) is a core ability that enables to effectively tackle both short and long PRs. +- Our [PR Compression strategy](https://codium-ai.github.io/Docs-PR-Agent/core-abilities/#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](pr_agent/settings/configuration.toml) 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). diff --git a/docs/docs/index.md b/docs/docs/index.md index 48de1a889..ead1faa69 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -9,7 +9,7 @@ CodiumAI PR-Agent is an open-source tool to help efficiently review and handle p - See the [Tools Guide](./tools/index.md) for a detailed description of the different tools (tools are run via the commands). -## Features table +## PR-Agent Features PR-Agent offers extensive pull request functionalities across various git providers. | | | GitHub | Gitlab | Bitbucket | Azure DevOps | @@ -152,21 +152,7 @@ Check out the [PR Compression strategy](core-abilities/index.md) page for more d - [**Custom labels**](./tools/describe.md/#handle-custom-labels-from-the-repos-labels-page) - [**Global and wiki configuration**](./usage-guide/configuration_options.md/#wiki-configuration-file) - - -## 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: - -- PR-Agent emphasize **real-life practical usage**. Each tool (review, improve, ask, ...) has a single GPT-4 call, no more. We believe this is critical for realistic team usage - obtaining an answer quickly (~30 seconds) and affordably. -- PR-Agent [Compression strategy](core-abilities/index.md) is a core ability that enables to effectively tackle both short and long PRs. -- YAML prompting strategy enables to have **modular, customizable, highly efficient tools**. -- PR-Agent is flexible and **highly configurable**. -- PR-Agent supports **multiple git providers** (GitHub, Gitlab, Bitbucket, Azure devops), **multiple ways** to use the tool (CLI, GitHub Action, GitHub App, Docker, ...), and **multiple models** (GPT-4, GPT-3.5, Anthropic, Cohere, Llama, ...). - - + ## Data privacy If you host PR-Agent with your OpenAI API key, it is between you and OpenAI. You can read their API data privacy policy here: