From 4f7c7630ad4c7b7d5ac9d48796533b8ff2167bee Mon Sep 17 00:00:00 2001 From: Ankur Tyagi Date: Wed, 11 Dec 2024 04:33:23 +0100 Subject: [PATCH 01/19] docs: add CodeRabbit API doc link to awesome list --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 8157b62..7c74348 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ This curated list covers the best resources, tutorials, and community content re - [Official Resources](#official-resources) - [Getting Started](#getting-started) +- [API Reference](#api-reference) - [Integration Guides](#integration-guides) - [Media Coverage](#media-coverage) - [Video Tutorials](#video-tutorials) @@ -32,6 +33,10 @@ This curated list covers the best resources, tutorials, and community content re - [CodeRabbit Startup Program](https://www.coderabbit.ai/blog/coderabbit-startup-program) - Special program for startups. - [AI Code Reviewer Examples](https://www.coderabbit.ai/blog/how-to-use-an-ai-code-reviewer-on-github-in-4-examples) - Four practical examples of using CodeRabbit. +## API Reference + +- [OpenAPI Documentation](https://api.coderabbit.ai/api/swagger/) - Complete Swagger documentation for CodeRabbit's REST API endpoints. + ## Integration Guides - [Azure DevOps Integration](https://www.coderabbit.ai/blog/getting-started-with-coderabbit-using-azure-devops) - Guide for integrating with Azure DevOps. From fa093c0a7a160330427c57daa5625ad5419fd0df Mon Sep 17 00:00:00 2001 From: Ankur Tyagi Date: Wed, 11 Dec 2024 05:02:29 +0100 Subject: [PATCH 02/19] chore: add real-world coderabbit config examples for python, typescript, javascript and golang --- README.md | 56 +++++++++++++++++++ configs/go/golang-uber-style-config.yaml | 32 +++++++++++ .../javascript/javascript-mocha-config.yaml | 28 ++++++++++ configs/python/python-ruff-config.yaml | 29 ++++++++++ .../testing/cypress-enterprise-config.yaml | 38 +++++++++++++ .../typescript-google-style-config.yaml | 22 ++++++++ 6 files changed, 205 insertions(+) create mode 100644 configs/go/golang-uber-style-config.yaml create mode 100644 configs/javascript/javascript-mocha-config.yaml create mode 100644 configs/python/python-ruff-config.yaml create mode 100644 configs/testing/cypress-enterprise-config.yaml create mode 100644 configs/typescript/typescript-google-style-config.yaml diff --git a/README.md b/README.md index 7c74348..49c57fb 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ This curated list covers the best resources, tutorials, and community content re - [Official Resources](#official-resources) - [Getting Started](#getting-started) - [API Reference](#api-reference) +- [Configuration Examples](#configuration-examples) - [Integration Guides](#integration-guides) - [Media Coverage](#media-coverage) - [Video Tutorials](#video-tutorials) @@ -37,6 +38,61 @@ This curated list covers the best resources, tutorials, and community content re - [OpenAPI Documentation](https://api.coderabbit.ai/api/swagger/) - Complete Swagger documentation for CodeRabbit's REST API endpoints. +## Configuration Examples + +### Enterprise Configuration Example + +Explore real-world CodeRabbit configurations from various projects. + +```yaml +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json +language: "en-US" +early_access: false +tone_instructions: 'You are an expert code reviewer in Java, TypeScript, JavaScript, and NodeJS. You work in an enterprise software developer team, providing concise and clear code review advice. You only elaborate or provide detailed explanations when requested.' +reviews: + profile: "chill" + request_changes_workflow: false + high_level_summary: true + poem: true + review_status: true + collapse_walkthrough: false + auto_review: + enabled: true + drafts: false + base_branches: ["pg", "release"] + path_instructions: + - path: "app/client/cypress/**/**.*" + instructions: | + Review the following e2e test code written using the Cypress test library. Ensure that: + - Follow best practices for Cypress code and e2e automation + - Avoid using cy.wait in code + - Avoid using cy.pause in code + - Avoid using agHelper.sleep() + - Use locator variables for locators + - Use data-* attributes for selectors + - Avoid Xpaths, Attributes and CSS path + - Avoid selectors like .btn.submit + - Perform logins via API + - Avoid using it.only + - Use multiple assertions + - Avoid string assertions + - Ensure unique filenames +chat: + auto_reply: true +``` + +Find more examples in the [`configs/`](configs/) directory, organized by language: + +``` +configs/ +├── javascript/ # JavaScript project configurations +├── typescript/ # TypeScript project configurations +├── python/ # Python project configurations +├── go/ # Go project configurations +└── multi-language/ # Full-stack project configurations +``` + + ## Integration Guides - [Azure DevOps Integration](https://www.coderabbit.ai/blog/getting-started-with-coderabbit-using-azure-devops) - Guide for integrating with Azure DevOps. diff --git a/configs/go/golang-uber-style-config.yaml b/configs/go/golang-uber-style-config.yaml new file mode 100644 index 0000000..c185596 --- /dev/null +++ b/configs/go/golang-uber-style-config.yaml @@ -0,0 +1,32 @@ +language: "en" +early_access: false +reviews: + request_changes_workflow: false + high_level_summary: true + poem: false + review_status: true + collapse_walkthrough: true + path_filters: + - "!api/" + path_instructions: + - path: "**/*.go" + instructions: "Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations." + - path: "tests/**/*" + instructions: | + "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request" + - path: "**/*_test.go" + instructions: | + "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request" + - path: "**/*.md" + instructions: | + "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness" + auto_review: + enabled: true + ignore_title_keywords: + - "WIP" + - "DO NOT MERGE" + drafts: false + base_branches: + - "main" +chat: + auto_reply: true diff --git a/configs/javascript/javascript-mocha-config.yaml b/configs/javascript/javascript-mocha-config.yaml new file mode 100644 index 0000000..1ba2b6d --- /dev/null +++ b/configs/javascript/javascript-mocha-config.yaml @@ -0,0 +1,28 @@ +language: "ja" +early_access: false +reviews: + request_changes_workflow: true + high_level_summary: true + poem: false + review_status: false + collapse_walkthrough: false + path_filters: + - "!**/.xml" + path_instructions: + - path: "**/*.js" + instructions: "Review the JavaScript code for conformity with the Google JavaScript style guide, highlighting any deviations." + - path: "tests/**/*" + instructions: | + "Assess the unit test code employing the Mocha testing framework. Confirm that: + - The tests adhere to Mocha's established best practices. + - Test descriptions are sufficiently detailed to clarify the purpose of each test." + auto_review: + enabled: true + ignore_title_keywords: + - "WIP" + - "DO NOT MERGE" + drafts: false + base_branches: + - "main" +chat: + auto_reply: true diff --git a/configs/python/python-ruff-config.yaml b/configs/python/python-ruff-config.yaml new file mode 100644 index 0000000..d37fb12 --- /dev/null +++ b/configs/python/python-ruff-config.yaml @@ -0,0 +1,29 @@ +language: "ja" +early_access: false +reviews: + profile: "assertive" + request_changes_workflow: false + high_level_summary: true + poem: false + review_status: true + collapse_walkthrough: false + path_filters: + - "!.gitignore" + - "!backend/app/db/alembic_*" + path_instructions: + - path: "**/*.py" + instructions: + "Review the Python code for conformity with Ruff linter and formatter.\ + Do not review the import path." + auto_review: + enabled: true + ignore_title_keywords: + - "WIP" + - "DO NOT MERGE" + drafts: false + tools: + # デフォルトでONだが効いてるか不明なのであえて明示化 + ruff: + enabled: true +chat: + auto_reply: true diff --git a/configs/testing/cypress-enterprise-config.yaml b/configs/testing/cypress-enterprise-config.yaml new file mode 100644 index 0000000..c042d19 --- /dev/null +++ b/configs/testing/cypress-enterprise-config.yaml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json +language: "en-US" +early_access: false +tone_instructions: 'You are an expert code reviewer in Java, TypeScript, JavaScript, and NodeJS. You work in an enterprise software developer team, providing concise and clear code review advice.You only elaborate or provide detailed explanations when requested.' +reviews: + profile: "chill" + request_changes_workflow: false + high_level_summary: true + poem: true + review_status: true + collapse_walkthrough: false + auto_review: + enabled: true + drafts: false + base_branches: ["pg", "release"] + path_instructions: + - path: "app/client/cypress/**/**.*" + instructions: | + Review the following e2e test code written using the Cypress test library. Ensure that: + - Follow best practices for Cypress code and e2e automation. + - Avoid using cy.wait in code. + - Avoid using cy.pause in code. + - Avoid using agHelper.sleep(). + - Use locator variables for locators and do not use plain strings. + - Use data-* attributes for selectors. + - Avoid Xpaths, Attributes and CSS path. + - Avoid selectors like .btn.submit or button[type=submit]. + - Perform logins via API with LoginFromAPI. + - Perform logout via API with LogOutviaAPI. + - Perform signup via API with SignupFromAPI. + - Avoid using it.only. + - Avoid using after and aftereach in test cases. + - Use multiple assertions for expect statements. + - Avoid using strings for assertions. + - Do not use duplicate filenames even with different paths. + - Avoid using agHelper.Sleep, this.Sleep in any file in code. +chat: + auto_reply: true diff --git a/configs/typescript/typescript-google-style-config.yaml b/configs/typescript/typescript-google-style-config.yaml new file mode 100644 index 0000000..5d63317 --- /dev/null +++ b/configs/typescript/typescript-google-style-config.yaml @@ -0,0 +1,22 @@ +# https://coderabbit.ai/docs/get-started/customize-coderabbit + +language: "ja" +early_access: true +reviews: + request_changes_workflow: false + high_level_summary: true + poem: true + review_status: true + collapse_walkthrough: false + path_filters: + - "!**/.xml" + path_instructions: + - path: "**.ts" + instructions: "Review the TypeScript code for conformity with the Google TypeScript style guide, highlighting any deviations." + auto_review: + enabled: true + ignore_title_keywords: + - ":construction:" + drafts: false +chat: + auto_reply: true From e23730dcea69781c050267e0c8a95d411f3f6fca Mon Sep 17 00:00:00 2001 From: Ankur Tyagi Date: Wed, 11 Dec 2024 05:14:53 +0100 Subject: [PATCH 03/19] chore: add real-world coderabbit config examples for python, typescript, javascript and golang --- configs/fullstack/coderabbit-full-stack.yaml | 78 +++++++++++++++++++ configs/go/coderabbit-uber-style.yaml | 32 ++++++++ .../javascript/react-mui-style-config.yaml | 17 ++++ configs/nestjs/nestjs-docker-config.yaml | 32 ++++++++ configs/typescript/coderabbit-vitest.yaml | 27 +++++++ configs/typescript/react-graphql-config.yaml | 48 ++++++++++++ 6 files changed, 234 insertions(+) create mode 100644 configs/fullstack/coderabbit-full-stack.yaml create mode 100644 configs/go/coderabbit-uber-style.yaml create mode 100644 configs/javascript/react-mui-style-config.yaml create mode 100644 configs/nestjs/nestjs-docker-config.yaml create mode 100644 configs/typescript/coderabbit-vitest.yaml create mode 100644 configs/typescript/react-graphql-config.yaml diff --git a/configs/fullstack/coderabbit-full-stack.yaml b/configs/fullstack/coderabbit-full-stack.yaml new file mode 100644 index 0000000..d21bb16 --- /dev/null +++ b/configs/fullstack/coderabbit-full-stack.yaml @@ -0,0 +1,78 @@ +language: en-US +tone_instructions: '' +early_access: false +enable_free_tier: true +reviews: + profile: assertive + request_changes_workflow: false + high_level_summary: true + high_level_summary_placeholder: '@coderabbitai summary' + auto_title_placeholder: '@coderabbitai' + review_status: true + poem: true + collapse_walkthrough: false + sequence_diagrams: true + path_filters: [ + "!**/*.ptxt" + ] + path_instructions: [ + { + "path": "drafts/*.md", + "instructions": "These are PHP RFC's to change the PHP language. Do not just consider the grammar of the text, but consider how it might change the language. For example, if a new feature is being added, consider how it might be used, and propose better ideas if you have them." + } + ] + abort_on_close: true + auto_review: + enabled: true + auto_incremental_review: true + ignore_title_keywords: [] + labels: [] + drafts: false + base_branches: [] + tools: + shellcheck: + enabled: true + ruff: + enabled: true + markdownlint: + enabled: true + github-checks: + enabled: true + timeout_ms: 90000 + languagetool: + enabled: true + enabled_only: false + level: default + biome: + enabled: true + hadolint: + enabled: true + swiftlint: + enabled: true + phpstan: + enabled: true + level: default + golangci-lint: + enabled: true + yamllint: + enabled: true + gitleaks: + enabled: true + checkov: + enabled: true + detekt: + enabled: true + eslint: + enabled: true +chat: + auto_reply: true +knowledge_base: + opt_out: false + learnings: + scope: auto + issues: + scope: auto + jira: + project_keys: [] + linear: + team_keys: [] diff --git a/configs/go/coderabbit-uber-style.yaml b/configs/go/coderabbit-uber-style.yaml new file mode 100644 index 0000000..c185596 --- /dev/null +++ b/configs/go/coderabbit-uber-style.yaml @@ -0,0 +1,32 @@ +language: "en" +early_access: false +reviews: + request_changes_workflow: false + high_level_summary: true + poem: false + review_status: true + collapse_walkthrough: true + path_filters: + - "!api/" + path_instructions: + - path: "**/*.go" + instructions: "Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations." + - path: "tests/**/*" + instructions: | + "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request" + - path: "**/*_test.go" + instructions: | + "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request" + - path: "**/*.md" + instructions: | + "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness" + auto_review: + enabled: true + ignore_title_keywords: + - "WIP" + - "DO NOT MERGE" + drafts: false + base_branches: + - "main" +chat: + auto_reply: true diff --git a/configs/javascript/react-mui-style-config.yaml b/configs/javascript/react-mui-style-config.yaml new file mode 100644 index 0000000..a8e0272 --- /dev/null +++ b/configs/javascript/react-mui-style-config.yaml @@ -0,0 +1,17 @@ +language: "en-US" +early_access: false +reviews: + path_instructions: + - path: "*" + instructions: | + Review the JavaScript code against the following rules: + - No new libraries are added. + - Only functional components, no class components. + - No commented code. + - No Console.log. + - Pascalcase for components, routes and pages. Example, catalogueIndex.js -> WRONG, CatalogueIndex.js -> CORRECT + - Follow Camelcase. Example, Is-Open -> WRONG, is_open -> WRONG, isOpen -> WRONG, saveProfileModalIsOpen -> CORRECT, openStateSaveProfileModal -> CORRECT, isSaveProfileModalOpen -> CORRECT + - State management, useState is preferred and redux is preferred. Example, const [isSaveProfileModalOpen, setIsSaveProfileModalOpen] = useState(false)\n const dispatch = useDispatch(); \nconst Button = useSelector((state) => state.nav.Button) \ndispatch(setButton(buttons[0])); + - MaterialUI is the preferred library. + - Avoid the container and item layout model, use display flex and flex properties within the sx part of a Grid tag. Example, WRONG -> …, CORRECT -> … + - No secret, API key, ssh key or any sensitive information should be hard coded and pushed. diff --git a/configs/nestjs/nestjs-docker-config.yaml b/configs/nestjs/nestjs-docker-config.yaml new file mode 100644 index 0000000..8f4dfd5 --- /dev/null +++ b/configs/nestjs/nestjs-docker-config.yaml @@ -0,0 +1,32 @@ +language: en +early_access: false +reviews: + high_level_summary: true + poem: false + review_status: true + collapse_walkthrough: false + path_filters: + - "!**/.github/workflows/*" + - "!**/node_modules/**" # Exclude dependencies + - "!**/dist/**" # Exclude build files + path_instructions: + - path: "src/**/*.{ts,js}" + instructions: "Review the TypeScript/JavaScript code for NestJS best practices, dependency injection, module structure, and potential bugs. Ensure that the code adheres to TypeScript's typing system and modern standards." + - path: "src/**/*.spec.ts" + instructions: "Review the unit tests, ensuring proper NestJS testing techniques (using TestingModule, mocks, etc.). Check for completeness and coverage." + - path: "manifests/**/*.{yaml,yml}" + instructions: "Review the kubernetes manifests used in Github workflows." + - path: "**/Dockerfile" + instructions: "Review the Dockerfile for best practices in building, optimizing, and running a NestJS application." + - path: "**/quickstart-services.yml" + instructions: "Review Docker Compose configurations for environment setup, ensuring proper service configuration, network setup, and environment variables handling." + - path: "**/quickstart-services-ai.yml" + instructions: "Review Docker Compose configurations for environment setup, ensuring proper service configuration, network setup, and environment variables handling." + - path: "**/quickstart-services-ai-debug.yml" + instructions: "Review Docker Compose configurations for environment setup, ensuring proper service configuration, network setup, and environment variables handling." + - path: "**/quickstart-services-kratos-debug.yml" + instructions: "Review Docker Compose configurations for environment setup, ensuring proper service configuration, network setup, and environment variables handling." + - path: "**/*.md" + instructions: "Ensure the documentation is clear, concise, and up-to-date, with accurate instructions for running the NestJS application in Docker." +chat: + auto_reply: true diff --git a/configs/typescript/coderabbit-vitest.yaml b/configs/typescript/coderabbit-vitest.yaml new file mode 100644 index 0000000..37c1e51 --- /dev/null +++ b/configs/typescript/coderabbit-vitest.yaml @@ -0,0 +1,27 @@ +# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json +language: "en" +early_access: true +reviews: + high_level_summary: true + poem: false + review_status: true + collapse_walkthrough: false + path_filters: + - "!dist/**" + path_instructions: + - path: "__tests__/**.*" + instructions: | + "Assess the unit test code employing the Vitest testing framework. Confirm that: + - The tests adhere to Vitest's established best practices. + - Test descriptions are sufficiently detailed to clarify the purpose of each test." + auto_review: + enabled: true + ignore_title_keywords: + - "WIP" + - "DO NOT MERGE" + drafts: false + base_branches: + - "main" + - "next" +chat: + auto_reply: true diff --git a/configs/typescript/react-graphql-config.yaml b/configs/typescript/react-graphql-config.yaml new file mode 100644 index 0000000..fd2e0b5 --- /dev/null +++ b/configs/typescript/react-graphql-config.yaml @@ -0,0 +1,48 @@ +language: en +early_access: false +reviews: + high_level_summary: true + sequence_diagrams: true + poem: false + review_status: true + collapse_walkthrough: false + changed_files_summary: true + path_filters: + - "!**/.github/**" + - "!**/node_modules/**" # Exclude dependencies + path_instructions: + - path: "src/**/*.{ts,tsx,js}" + instructions: | + Review the React.js/TypeScript/JavaScript code for best practices and potential bugs. + Ensure that the code adheres to TypeScript's typing system and modern standards. + Ensure sufficient error handling and logging is present. + Check for common security vulnerabilities such as: + - SQL Injection + - XSS (Cross-Site Scripting) + - CSRF (Cross-Site Request Forgery) + - Insecure dependencies + - Sensitive data exposure + - path: "src/**/*.{graphql,gql}" + instructions: | + Review the GraphQL schema and queries for best practices, potential bugs, and adherence to the project's GraphQL standards. + Ensure that the schema is well-defined and queries are optimized. + Check for security vulnerabilities. + - path: "src/**/*.json" + instructions: | + Review the JSON files for correct syntax and structure. + Ensure that the configuration and data are accurate and follow the project's standards. + Check for sensitive data exposure and ensure that the data is properly validated. + - path: "public/**/*.html" + instructions: | + Review the HTML files for correct syntax and structure. + Ensure that the content is accessible, semantic, and follows the project's standards. + - path: "src/**/*.yaml" + instructions: | + Review the YAML files for correct syntax and structure. + Ensure that the configuration is accurate and follows the project's standards. + Check for potential security issues and ensure that the data is properly validated. + - path: "**/*.md" + instructions: "Ensure the documentation is clear, concise, and up-to-date, with accurate instructions." +chat: + auto_reply: true + From c827774edc9213182c3e7537c929ffc56fec275b Mon Sep 17 00:00:00 2001 From: Ankur Tyagi Date: Wed, 11 Dec 2024 05:18:14 +0100 Subject: [PATCH 04/19] chore: add real-world coderabbit config examples for python, typescript, javascript and golang --- configs/django/coderabbit-clean.yaml | 28 +++++++++++ configs/go/coderabbit-actor-ddd.yaml | 47 +++++++++++++++++++ configs/go/coderabbit-uber-e2e.yaml | 35 ++++++++++++++ .../javascript/coderabbit-mocha-google.yaml | 29 ++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 configs/django/coderabbit-clean.yaml create mode 100644 configs/go/coderabbit-actor-ddd.yaml create mode 100644 configs/go/coderabbit-uber-e2e.yaml create mode 100644 configs/javascript/coderabbit-mocha-google.yaml diff --git a/configs/django/coderabbit-clean.yaml b/configs/django/coderabbit-clean.yaml new file mode 100644 index 0000000..0c4e530 --- /dev/null +++ b/configs/django/coderabbit-clean.yaml @@ -0,0 +1,28 @@ +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json +language: "en-US" +early_access: false +reviews: + profile: "chill" + request_changes_workflow: false + high_level_summary: true + poem: true + review_status: true + collapse_walkthrough: false + auto_review: + enabled: true + drafts: false + path_instructions: + - path: "**/*.py" + instructions: | + Review the following code using Python Django. Ensure that: + - Ensure each method has a clear, detailed docstring explaining its purpose, parameters, and return values. Enhance existing docstrings for clarity and completeness. + - Do not suggest adding type annotations. + - Review Django querysets for potential performance improvements and suggest optimizations where applicable. + - Ensure that for every model.save() there is a model.full_clean() that precedes it. + - Avoid adding generic exception handling (e.g., `except Exception`) in test files. Each test failure should be addressed by the developer with specific exception handling or fixes. + - Avoid adding comments relating to importing modules. + - path: "tests/*.py" + instructions: | + - There is no sensitive information in the test files. All data handled is procedural/generic and non-sensitive. +chat: + auto_reply: true diff --git a/configs/go/coderabbit-actor-ddd.yaml b/configs/go/coderabbit-actor-ddd.yaml new file mode 100644 index 0000000..cd86908 --- /dev/null +++ b/configs/go/coderabbit-actor-ddd.yaml @@ -0,0 +1,47 @@ +language: "en" +early_access: true +tone_instructions: | + Be casual, friendly, and egoless, using approachable, clear, and conversational language that feels warm and engaging. + Keep the writing light, concise, and positive, as if speaking to a peer. +reviews: + request_changes_workflow: true + high_level_summary: true + poem: false + review_status: true + collapse_walkthrough: false + sequence_diagrams: true + path_filters: + - "!**/*.pb.go" + path_instructions: + - path: "**/*.go" + instructions: | + Review the Golang files with a focus on the project's goals: + - Actor Model Integration: Ensure the code effectively utilizes the [protoactor](https://github.com/AsynkronIT/protoactor-go) + framework, adhering to best practices of the Actor Model. + - Domain-Driven Design: Verify that Domain-Driven Design principles are integrated properly, with clear separation of concerns + and well-defined domain models. Ensure the use of Event Sourcing is correctly implemented in the Actor-based system. + - Code Quality and Maintainability: Focus on readability, proper use of Go idioms, and maintainable code structure. Check + for consistent naming conventions, efficient error handling, and adequate documentation, including meaningful comments where needed. + - Performance and Scalability: Identify any potential areas for performance improvement, especially concerning actor behavior, + concurrency, and data persistence. Suggest refactoring if the code can be streamlined or optimized. + - path: "**/*.md" + instructions: | + Review markdown documentation with these guidelines: + - Structure: Ensure consistent heading hierarchy and document organization + - Content: Verify accuracy of technical details, code examples, and API references + - Quality: Check for spelling, grammar, and broken links + - Completeness: Confirm all features and changes are properly documented + - Style: Follow project's documentation style guide and formatting conventions + auto_review: + enabled: true + drafts: false + base_branches: + - "main" +chat: + auto_reply: true + auto_reply_messages: + greeting: "👋 Thanks for the mention! 😊 I'm here to assist with your code review." + help_request: "🫡 I'm on it! What specific aspect would you like me to focus on?" + triggers: + - keywords: ["help", "review", "check"] + response: "👌 Got it! I'll review that for you right away." diff --git a/configs/go/coderabbit-uber-e2e.yaml b/configs/go/coderabbit-uber-e2e.yaml new file mode 100644 index 0000000..01decad --- /dev/null +++ b/configs/go/coderabbit-uber-e2e.yaml @@ -0,0 +1,35 @@ +language: "en" +early_access: false +reviews: + request_changes_workflow: false + high_level_summary: true + poem: false + review_status: false + collapse_walkthrough: true + path_filters: + - "!**/*.pb.go" + - "!**/*.pb.gw.go" + - "!**/*.mod" + - "!**/*.sum" + path_instructions: + - path: "**/*.go" + instructions: "Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations." + - path: "e2e/**/*" + instructions: | + "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request" + - path: "**/*_test.go" + instructions: | + "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request" + - path: "**/*.md" + instructions: | + "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness" + auto_review: + enabled: false + ignore_title_keywords: + - "WIP" + - "DO NOT MERGE" + drafts: false + base_branches: + - "main" +chat: + auto_reply: true diff --git a/configs/javascript/coderabbit-mocha-google.yaml b/configs/javascript/coderabbit-mocha-google.yaml new file mode 100644 index 0000000..b919ddb --- /dev/null +++ b/configs/javascript/coderabbit-mocha-google.yaml @@ -0,0 +1,29 @@ +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json +language: "en" +early_access: false +reviews: + profile: "chill" + request_changes_workflow: false + high_level_summary: true + poem: true + review_status: true + collapse_walkthrough: false + sequence_diagrams: false + auto_review: + enabled: true + drafts: false + base_branches: + - development + - feat/.* + path_instructions: + - path: "**/*.js" + instructions: + "Review the JavaScript code for conformity with the Google + JavaScript style guide, highlighting any deviations." + - path: "tests/**/*" + instructions: + "Assess the unit test code employing the Mocha testing framework. + Test descriptions must be sufficiently detailed to clarify the + purpose of each test." +chat: + auto_reply: true From 1ee27a02feb822647b1ab231dd1c873c4c53271b Mon Sep 17 00:00:00 2001 From: Ankur Tyagi Date: Wed, 11 Dec 2024 05:19:53 +0100 Subject: [PATCH 05/19] chore: add real-world coderabbit config examples for python, typescript, javascript and golang --- configs/nuxt/coderabbit-vue-typescript.yaml | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 configs/nuxt/coderabbit-vue-typescript.yaml diff --git a/configs/nuxt/coderabbit-vue-typescript.yaml b/configs/nuxt/coderabbit-vue-typescript.yaml new file mode 100644 index 0000000..d5ee2ed --- /dev/null +++ b/configs/nuxt/coderabbit-vue-typescript.yaml @@ -0,0 +1,35 @@ +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json +language: "en-US" +early_access: true +reviews: + path_filters: + - "!**/*.xml" + - "!**/*.yaml" + - "!components/Ui/**" + path_instructions: + - path: "**/*.vue" + instructions: | + Review Vue files for a Nuxt3 project. Ensure that: + - The `