Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure coderabbit review to also consider PR on dev branch. #2441

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

DarkaMaul
Copy link
Contributor

@DarkaMaul DarkaMaul commented Apr 23, 2024

Provides sane default for Coderabbit PR review :

Source : https://docs.coderabbit.ai/guides/configure-coderabbit/

I added some comment below to explain a bit the options.

# Perform the review in English
language: "en" 

# Opt out of early access features / beta features 
early_access: false

knowledge_base:
  learnings:
    # To answer/comment on PR, CodeRabbit uses the repository learnings
    scope: auto
  issues:
    # However, issues are considered on an organization level
    scope: global
reviews:
  # Default tone of review, chill instead of assertive
  profile: "chill"
  # Default value
  request_changes_workflow: false
  # Provides a high level summary
  high_level_summary: true
  # Don't add a poem
  poem: false
  # ?
  review_status: true
  # Make the walktrough collapsed by default
  collapse_walkthrough: true
  # Auto review on every PR except the one with WIP/Do not merge that targets default branches and dev
  auto_review:
    enabled: true
    ignore_title_keywords:
      - "WIP"
      - "DO NOT MERGE"
    drafts: false
    base_branches:
      - dev
chat:
  # CodeRabbit can reply by itself.
  auto_reply: true

Summary by CodeRabbit

  • New Features
    • Introduced configuration settings for the CodeRabbit platform to enhance language support, knowledge base management, review processes, and chat automation capabilities.

Copy link

coderabbitai bot commented Apr 23, 2024

Walkthrough

Walkthrough

The update introduces the .coderabbit.yaml file, which serves as a new configuration file for the CodeRabbit platform. This file allows users to customize various settings such as language preferences, knowledge base configurations, review settings, and chat automation options, enhancing user experience and platform adaptability.

Changes

File Change Summary
.coderabbit.yaml Introduced to set configurations for language, knowledge base, review settings, and chat automation.

Recent Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 7f82f4a and 8c46b9e.
Files selected for processing (1)
  • .coderabbit.yaml (1 hunks)
Additional comments not posted (11)
.coderabbit.yaml (11)

1-1: Ensure the schema URL is accessible and correct.


2-2: Setting the review language to English aligns with the PR objectives.


3-3: Opting out of early access features may help avoid unstable or untested functionalities.


6-6: Auto-scoping for learning ensures that the system adapts based on repository-specific interactions.


8-8: Setting the issue scope to global allows for a broader knowledge base, which can improve issue handling.


10-10: The 'chill' profile for reviews might enhance the user experience by making interactions less formal.


11-11: Disabling the request changes workflow by default could streamline the review process, but ensure it aligns with your project's needs.


12-13: Including a high-level summary while excluding poems focuses the reviews on technical content.


14-15: Enabling review status and collapsing the walkthrough by default can make reviews concise and less overwhelming.


17-23: Auto-review settings are well-configured to exclude drafts and PRs with specific keywords targeting the dev branch. Ensure this aligns with your workflow.


25-25: Enabling auto-reply in chat can enhance responsiveness but monitor for any potential miscommunications.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@0xalpharush
Copy link
Contributor

I find the bot annoying personally. Do you think it is useful?

@DarkaMaul
Copy link
Contributor Author

I think we were misusing it at least because it could not do analyze PR made on the dev branch.

Maybe we should give it a try for a couple of weeks to see if it provides valuable feedback.

@0xalpharush 0xalpharush merged commit ded705d into dev Apr 24, 2024
79 checks passed
@0xalpharush 0xalpharush deleted the features/code-rabbit branch April 24, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants