From 7704379e627a573f3894aaf1051468ca2867a02f Mon Sep 17 00:00:00 2001 From: mrT23 Date: Wed, 16 Apr 2025 13:39:52 +0300 Subject: [PATCH] Add new tool for scanning repository discussions and generating best practices --- README.md | 96 ++++++++++++------------ docs/docs/index.md | 1 + docs/docs/tools/index.md | 1 + docs/docs/tools/scan_repo_discussions.md | 38 ++++++++++ docs/mkdocs.yml | 7 +- 5 files changed, 92 insertions(+), 51 deletions(-) create mode 100644 docs/docs/tools/scan_repo_discussions.md diff --git a/README.md b/README.md index 30794960..94941097 100644 --- a/README.md +++ b/README.md @@ -52,13 +52,22 @@ PR-Agent aims to help efficiently review and handle pull requests, by providing ## News and Updates +## Apr 16, 2025 + +New tool for Qodo Merge 💎 - `/scan_repo_discussions`. + +image + +Read more about it [here](https://qodo-merge-docs.qodo.ai/tools/scan_repo_discussions/). + + ## Apr 14, 2025 GPT-4.1 is out. And its quite good on coding tasks... https://openai.com/index/gpt-4-1/ -image +image ## March 28, 2025 @@ -71,16 +80,6 @@ This version includes a new tool, [Help Docs](https://qodo-merge-docs.qodo.ai/to ### Feb 28, 2025 A new version, v0.27, was released. See release notes [here](https://github.com/qodo-ai/pr-agent/releases/tag/v0.27). -### Feb 27, 2025 -- Updated the default model to `o3-mini` for all tools. You can still use the `gpt-4o` as the default model by setting the `model` parameter in the configuration file. -- Important updates and bug fixes for Azure DevOps, see [here](https://github.com/qodo-ai/pr-agent/pull/1583) -- Added support for adjusting the [response language](https://qodo-merge-docs.qodo.ai/usage-guide/additional_configurations/#language-settings) of the PR-Agent tools. - - -### December 30, 2024 - -Following feedback from the community, we have addressed two vulnerabilities identified in the open-source PR-Agent project. The [fixes](https://github.com/qodo-ai/pr-agent/pull/1425) are now included in the newly released version (v0.26), available as of today. - ## Overview
@@ -88,43 +87,44 @@ Following feedback from the community, we have addressed two vulnerabilities ide Supported commands per platform: | | | GitHub | GitLab | Bitbucket | Azure DevOps | -|-------|---------------------------------------------------------------------------------------------------------|:--------------------:|:--------------------:|:---------:|:------------:| -| TOOLS | [Review](https://qodo-merge-docs.qodo.ai/tools/review/) | ✅ | ✅ | ✅ | ✅ | -| | [Describe](https://qodo-merge-docs.qodo.ai/tools/describe/) | ✅ | ✅ | ✅ | ✅ | -| | [Improve](https://qodo-merge-docs.qodo.ai/tools/improve/) | ✅ | ✅ | ✅ | ✅ | -| | [Ask](https://qodo-merge-docs.qodo.ai/tools/ask/) | ✅ | ✅ | ✅ | ✅ | -| | ⮑ [Ask on code lines](https://qodo-merge-docs.qodo.ai/tools/ask/#ask-lines) | ✅ | ✅ | | | -| | [Update CHANGELOG](https://qodo-merge-docs.qodo.ai/tools/update_changelog/) | ✅ | ✅ | ✅ | ✅ | -| | [Help Docs](https://qodo-merge-docs.qodo.ai/tools/help_docs/?h=auto#auto-approval) | ✅ | ✅ | ✅ | | -| | [Ticket Context](https://qodo-merge-docs.qodo.ai/core-abilities/fetching_ticket_context/) 💎 | ✅ | ✅ | ✅ | | -| | [Utilizing Best Practices](https://qodo-merge-docs.qodo.ai/tools/improve/#best-practices) 💎 | ✅ | ✅ | ✅ | | -| | [PR Chat](https://qodo-merge-docs.qodo.ai/chrome-extension/features/#pr-chat) 💎 | ✅ | | | | -| | [Suggestion Tracking](https://qodo-merge-docs.qodo.ai/tools/improve/#suggestion-tracking) 💎 | ✅ | ✅ | | | -| | [CI Feedback](https://qodo-merge-docs.qodo.ai/tools/ci_feedback/) 💎 | ✅ | | | | -| | [PR Documentation](https://qodo-merge-docs.qodo.ai/tools/documentation/) 💎 | ✅ | ✅ | | | -| | [Custom Labels](https://qodo-merge-docs.qodo.ai/tools/custom_labels/) 💎 | ✅ | ✅ | | | -| | [Analyze](https://qodo-merge-docs.qodo.ai/tools/analyze/) 💎 | ✅ | ✅ | | | -| | [Similar Code](https://qodo-merge-docs.qodo.ai/tools/similar_code/) 💎 | ✅ | | | | -| | [Custom Prompt](https://qodo-merge-docs.qodo.ai/tools/custom_prompt/) 💎 | ✅ | ✅ | ✅ | | -| | [Test](https://qodo-merge-docs.qodo.ai/tools/test/) 💎 | ✅ | ✅ | | | -| | [Implement](https://qodo-merge-docs.qodo.ai/tools/implement/) 💎 | ✅ | ✅ | ✅ | | -| | [Auto-Approve](https://qodo-merge-docs.qodo.ai/tools/improve/?h=auto#auto-approval) 💎 | ✅ | ✅ | ✅ | | -| | | | | | | -| USAGE | [CLI](https://qodo-merge-docs.qodo.ai/usage-guide/automations_and_usage/#local-repo-cli) | ✅ | ✅ | ✅ | ✅ | -| | [App / webhook](https://qodo-merge-docs.qodo.ai/usage-guide/automations_and_usage/#github-app) | ✅ | ✅ | ✅ | ✅ | -| | [Tagging bot](https://github.com/Codium-ai/pr-agent#try-it-now) | ✅ | | | | -| | [Actions](https://qodo-merge-docs.qodo.ai/installation/github/#run-as-a-github-action) | ✅ |✅| ✅ |✅| -| | | | | | | -| CORE | [PR compression](https://qodo-merge-docs.qodo.ai/core-abilities/compression_strategy/) | ✅ | ✅ | ✅ | ✅ | -| | Adaptive and token-aware file patch fitting | ✅ | ✅ | ✅ | ✅ | -| | [Multiple models support](https://qodo-merge-docs.qodo.ai/usage-guide/changing_a_model/) | ✅ | ✅ | ✅ | ✅ | -| | [Local and global metadata](https://qodo-merge-docs.qodo.ai/core-abilities/metadata/) | ✅ | ✅ | ✅ | ✅ | -| | [Dynamic context](https://qodo-merge-docs.qodo.ai/core-abilities/dynamic_context/) | ✅ | ✅ | ✅ | ✅ | -| | [Self reflection](https://qodo-merge-docs.qodo.ai/core-abilities/self_reflection/) | ✅ | ✅ | ✅ | ✅ | -| | [Static code analysis](https://qodo-merge-docs.qodo.ai/core-abilities/static_code_analysis/) 💎 | ✅ | ✅ | | | -| | [Global and wiki configurations](https://qodo-merge-docs.qodo.ai/usage-guide/configuration_options/) 💎 | ✅ | ✅ | ✅ | | -| | [PR interactive actions](https://www.qodo.ai/images/pr_agent/pr-actions.mp4) 💎 | ✅ | ✅ | | | -| | [Impact Evaluation](https://qodo-merge-docs.qodo.ai/core-abilities/impact_evaluation/) 💎 | ✅ | ✅ | | | +|-------|---------------------------------------------------------------------------------------------------------|:--------------------:|:--------------------:|:--------:|:------------:| +| TOOLS | [Review](https://qodo-merge-docs.qodo.ai/tools/review/) | ✅ | ✅ | ✅ | ✅ | +| | [Describe](https://qodo-merge-docs.qodo.ai/tools/describe/) | ✅ | ✅ | ✅ | ✅ | +| | [Improve](https://qodo-merge-docs.qodo.ai/tools/improve/) | ✅ | ✅ | ✅ | ✅ | +| | [Ask](https://qodo-merge-docs.qodo.ai/tools/ask/) | ✅ | ✅ | ✅ | ✅ | +| | ⮑ [Ask on code lines](https://qodo-merge-docs.qodo.ai/tools/ask/#ask-lines) | ✅ | ✅ | | | +| | [Update CHANGELOG](https://qodo-merge-docs.qodo.ai/tools/update_changelog/) | ✅ | ✅ | ✅ | ✅ | +| | [Help Docs](https://qodo-merge-docs.qodo.ai/tools/help_docs/?h=auto#auto-approval) | ✅ | ✅ | ✅ | | +| | [Ticket Context](https://qodo-merge-docs.qodo.ai/core-abilities/fetching_ticket_context/) 💎 | ✅ | ✅ | ✅ | | +| | [Utilizing Best Practices](https://qodo-merge-docs.qodo.ai/tools/improve/#best-practices) 💎 | ✅ | ✅ | ✅ | | +| | [PR Chat](https://qodo-merge-docs.qodo.ai/chrome-extension/features/#pr-chat) 💎 | ✅ | | | | +| | [Suggestion Tracking](https://qodo-merge-docs.qodo.ai/tools/improve/#suggestion-tracking) 💎 | ✅ | ✅ | | | +| | [CI Feedback](https://qodo-merge-docs.qodo.ai/tools/ci_feedback/) 💎 | ✅ | | | | +| | [PR Documentation](https://qodo-merge-docs.qodo.ai/tools/documentation/) 💎 | ✅ | ✅ | | | +| | [Custom Labels](https://qodo-merge-docs.qodo.ai/tools/custom_labels/) 💎 | ✅ | ✅ | | | +| | [Analyze](https://qodo-merge-docs.qodo.ai/tools/analyze/) 💎 | ✅ | ✅ | | | +| | [Similar Code](https://qodo-merge-docs.qodo.ai/tools/similar_code/) 💎 | ✅ | | | | +| | [Custom Prompt](https://qodo-merge-docs.qodo.ai/tools/custom_prompt/) 💎 | ✅ | ✅ | ✅ | | +| | [Test](https://qodo-merge-docs.qodo.ai/tools/test/) 💎 | ✅ | ✅ | | | +| | [Implement](https://qodo-merge-docs.qodo.ai/tools/implement/) 💎 | ✅ | ✅ | ✅ | | +| | [Scan Repo Discussions](https://qodo-merge-docs.qodo.ai/tools/scan_repo_discussions/) 💎 | ✅ | | | | +| | [Auto-Approve](https://qodo-merge-docs.qodo.ai/tools/improve/?h=auto#auto-approval) 💎 | ✅ | ✅ | ✅ | | +| | | | | | | +| USAGE | [CLI](https://qodo-merge-docs.qodo.ai/usage-guide/automations_and_usage/#local-repo-cli) | ✅ | ✅ | ✅ | ✅ | +| | [App / webhook](https://qodo-merge-docs.qodo.ai/usage-guide/automations_and_usage/#github-app) | ✅ | ✅ | ✅ | ✅ | +| | [Tagging bot](https://github.com/Codium-ai/pr-agent#try-it-now) | ✅ | | | | +| | [Actions](https://qodo-merge-docs.qodo.ai/installation/github/#run-as-a-github-action) | ✅ |✅| ✅ |✅| +| | | | | | | +| CORE | [PR compression](https://qodo-merge-docs.qodo.ai/core-abilities/compression_strategy/) | ✅ | ✅ | ✅ | ✅ | +| | Adaptive and token-aware file patch fitting | ✅ | ✅ | ✅ | ✅ | +| | [Multiple models support](https://qodo-merge-docs.qodo.ai/usage-guide/changing_a_model/) | ✅ | ✅ | ✅ | ✅ | +| | [Local and global metadata](https://qodo-merge-docs.qodo.ai/core-abilities/metadata/) | ✅ | ✅ | ✅ | ✅ | +| | [Dynamic context](https://qodo-merge-docs.qodo.ai/core-abilities/dynamic_context/) | ✅ | ✅ | ✅ | ✅ | +| | [Self reflection](https://qodo-merge-docs.qodo.ai/core-abilities/self_reflection/) | ✅ | ✅ | ✅ | ✅ | +| | [Static code analysis](https://qodo-merge-docs.qodo.ai/core-abilities/static_code_analysis/) 💎 | ✅ | ✅ | | | +| | [Global and wiki configurations](https://qodo-merge-docs.qodo.ai/usage-guide/configuration_options/) 💎 | ✅ | ✅ | ✅ | | +| | [PR interactive actions](https://www.qodo.ai/images/pr_agent/pr-actions.mp4) 💎 | ✅ | ✅ | | | +| | [Impact Evaluation](https://qodo-merge-docs.qodo.ai/core-abilities/impact_evaluation/) 💎 | ✅ | ✅ | | | - 💎 means this feature is available only in [Qodo-Merge](https://www.qodo.ai/pricing/) [//]: # (- Support for additional git providers is described in [here](./docs/Full_environments.md)) diff --git a/docs/docs/index.md b/docs/docs/index.md index 5bdc8030..938fab7c 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -48,6 +48,7 @@ PR-Agent and Qodo Merge offers extensive pull request functionalities across var | | [Custom Prompt](https://qodo-merge-docs.qodo.ai/tools/custom_prompt/) 💎 | ✅ | ✅ | ✅ | | | | [Test](https://qodo-merge-docs.qodo.ai/tools/test/) 💎 | ✅ | ✅ | | | | | [Implement](https://qodo-merge-docs.qodo.ai/tools/implement/) 💎 | ✅ | ✅ | ✅ | | +| | [Scan Repo Discussions](https://qodo-merge-docs.qodo.ai/tools/scan_repo_discussions/) 💎 | ✅ | | | | | | [Auto-Approve](https://qodo-merge-docs.qodo.ai/tools/improve/?h=auto#auto-approval) 💎 | ✅ | ✅ | ✅ | | | | | | | | | | USAGE | [CLI](https://qodo-merge-docs.qodo.ai/usage-guide/automations_and_usage/#local-repo-cli) | ✅ | ✅ | ✅ | ✅ | diff --git a/docs/docs/tools/index.md b/docs/docs/tools/index.md index 419c6840..030d23c2 100644 --- a/docs/docs/tools/index.md +++ b/docs/docs/tools/index.md @@ -19,4 +19,5 @@ Here is a list of Qodo Merge tools, each with a dedicated page that explains how | **💎 [Improve Component (`/improve_component component_name`](./improve_component.md))** | Generates code suggestions for a specific code component that changed in the PR | | **💎 [CI Feedback (`/checks ci_job`](./ci_feedback.md))** | Automatically generates feedback and analysis for a failed CI job | | **💎 [Implement (`/implement`](./implement.md))** | Generates implementation code from review suggestions | +| **💎 [Scan Reop Discussions (`/scan_repo_discussions`](./implement.md))** | Generates `best_practices.md` file based on previous discussions in the repository | Note that the tools marked with 💎 are available only for Qodo Merge users. diff --git a/docs/docs/tools/scan_repo_discussions.md b/docs/docs/tools/scan_repo_discussions.md new file mode 100644 index 00000000..c7eb23c6 --- /dev/null +++ b/docs/docs/tools/scan_repo_discussions.md @@ -0,0 +1,38 @@ +`Platforms supported: GitHub` + + +## Overview + +The `scan_repo_discussions` tool analyzes code discussions (meaning review comments over code lines) from merged pull requests over the past 12 months. +It processes these discussions alongside other PR metadata to identify recurring patterns in team feedback and code reviews, generating a comprehensive `best_practices.md` document that distills key insights and recommendations. + +This file captures repository-specific patterns derived from your team's actual workflow and discussions, rather than more generic best practices. + +Teams are encouraged to further customize and refine these insights to better align with their specific development priorities and contexts. +This can be done by editing the `best_practices.md` file directly when the PR is created, or iteratively over time to enhance the 'best practices' suggestions provided by Qodo Merge. + +The tool can be invoked manually by commenting on any PR: +``` +/scan_repo_discussions +``` + +As a response, the bot will create a new PR that contains an auto-generated `best_practices.md` file. +Note that the scan can take several minutes to complete, since up to 250 PRs are scanned. + +Invoking the tool: + +![scan1](https://codium.ai/images/pr_agent/scan_repo_discussions_1.png){width=640} + +The PR created by the bot: + +![scan1](https://codium.ai/images/pr_agent/scan_repo_discussions_2.png){width=640} + +The `best_practices.md` file in the PR: + +![scan1](https://codium.ai/images/pr_agent/scan_repo_discussions_3.png){width=640} + +### Configuration options + +- Use `/scan_repo_discussions --scan_repo_discussions.force_scan=true` to force generating a PR with a new `best_practices.md` file, even if it already exists (by default, the bot will not generate a new file if it already exists). +- Use `/scan_repo_discussions --scan_repo_discussions.days_back=X` to specify the number of days back to scan for discussions. The default is 365 days. +- Use `/scan_repo_discussions --scan_repo_discussions.minimal_number_of_prs=X` to specify the minimum number of merged PRs needed to generate the `best_practices.md` file. The default is 50 PRs. \ No newline at end of file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 4ac00cfb..a6d1d4f6 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -39,6 +39,7 @@ nav: - 💎 CI Feedback: 'tools/ci_feedback.md' - 💎 Similar Code: 'tools/similar_code.md' - 💎 Implement: 'tools/implement.md' + - 💎 Scan Repo Discussions: 'tools/scan_repo_discussions.md' - Core Abilities: - 'core-abilities/index.md' - Auto best practices: 'core-abilities/auto_best_practices.md' @@ -76,8 +77,8 @@ theme: - navigation.top - navigation.tracking - navigation.indexes - - search.suggest - - search.highlight +# - search.suggest +# - search.highlight - content.tabs.link - content.code.annotation - content.code.copy @@ -107,7 +108,7 @@ theme: plugins: - social - - search +# - search - glightbox extra: