diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..8897a10 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,67 @@ +# Contributing Guide to CodeRabbit Documentation + +Welcome, and thank you for considering contributing to the **CodeRabbit Documentation**. This guide will help you get started and ensure a smooth contribution process. + +## Before You Start ✋ + +The CodeRabbit documentation repository is an open-source project aimed at creating clear, detailed, and developer-friendly documentation for CodeRabbit. Whether you're improving existing docs or adding new content, your contributions are valued. + +## How Can I Contribute? + +There are various ways you can contribute: + +- **Fixing Typos or Improving Grammar**: Even small fixes like spelling errors or improving sentence structure are appreciated. +- **Clarifying Existing Documentation**: If something is unclear, feel free to rewrite for better understanding and give a clear explanation in PR. +- **Suggesting Structural Improvements**: Propose changes that can improve the structure and navigation of the docs. + +### Join the Community + +- Connect with other contributors by joining our [CodeRabbit Discord Server](https://discord.gg/coderabbit). Feel free to introduce yourself in the `#intros` channel. + +## How to Contribute? 👨‍💻 + +### Fork and Pull Request Flow ⏳ + +1. **Fork** the repository to your GitHub account by visiting [CodeRabbit Docs GitHub repo](https://github.com/coderabbitai/coderabbit-docs). +2. **Clone** your fork locally: + ```shell + git clone git@github.com:YOUR_USERNAME/coderabbit-docs.git + +3. Create a new branch: +```shell +git checkout -b your_username/feature_description +``` + +4. Implement the changes then commit and push the changes from your working branch: +```shell +git commit -m "docs: add explanation about [section]" +git push origin your_username/feature_description +``` + +## Commit Message Format 💬 + +We require all commits in this repository to adhere to the following commit message format. + +``` +: (#) + +[optional body] +``` + +This format is based on [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). +Please refer to the Conventional Commits specification for more details. + +## Keeping your Fork Up-to-Date 🆕 +To keep your fork updated with the latest changes from the upstream repository: +```shell +git remote add upstream https://github.com/coderabbitai/coderabbit-docs.git +git fetch upstream +git rebase upstream/main +``` + +## Contributing Best Practices 🚨 + +- Work on **one issue at a time** to avoid confusion. +- If you need help, post in the `#support` channel on Discord. +- Test your changes locally before submitting a PR. +- While AI is cool, minimize its use for `direct team communication`. We value concise, genuine exchanges over scripted messages. \ No newline at end of file diff --git a/README.md b/README.md index 7c7a662..47e2f28 100644 --- a/README.md +++ b/README.md @@ -1 +1,218 @@ -# coderabbit-docs +

+ + CodeRabbit Logo + +

+ +# CodeRabbit Documentation + +Welcome to the official docs for [**CodeRabbit**](https://coderabbit.ai), the code review dev tool that helps you ship quality code faster. + +[![Website](https://img.shields.io/badge/website-coderabbit.ai-blue)](https://coderabbit.ai) +[![Twitter Follow](https://img.shields.io/twitter/follow/coderabbitai?style=social)](https://twitter.com/coderabbitai) +[![Discord](https://img.shields.io/discord/invite-code?color=7289DA&label=Discord&logo=discord&logoColor=green)](https://discord.com/invite/GsXnASn26c) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/coderabbitai/coderabbit-docs/pulls) + +## About CodeRabbit + +> **CodeRabbit** is an AI-powered code reviewer that delivers context-aware feedback on pull requests within minutes, reducing the time and effort needed for manual code reviews. It provides a fresh perspective and catches issues that are often missed, enhancing the overall review quality. + +- Automated code reviews +- Intelligent suggestions for code improvements +- Pull request summary +- Interactive chat +- Sequence diagrams +- Integration with popular version control platforms +- Support for multiple programming languages + +## Getting Started with CodeRabbit + +Follow these steps to and start using CodeRabbit: + +1. **Sign Up** + Visit [coderabbit.ai](https://coderabbit.ai/) and create your account. + +2. **Connect Your Repository** + Link your repository from one of the supported platforms: + - GitHub + - GitLab + - Azure DevOps + +3. **Configure Settings** + Customize your preferences in the CodeRabbit dashboard as per your project's needs. + +4. **Initiate Code Reviews** + Start creating pull requests on your platform, and let CodeRabbit assist with intelligent code reviews. + +# Configuring CodeRabbit + +CodeRabbit offers flexible configuration options. There are two primary methods for configuring CodeRabbit: + +1. Using the CodeRabbit UI (Web Interface) +2. Using a YAML Configuration File + +## 1. Using the CodeRabbit UI + +When you create an account and add repositories through the CodeRabbit web interface, you can configure settings for your organization and individual repositories. + +### Steps: +1. Sign up or log in at [coderabbit.ai](https://coderabbit.ai) +2. Navigate to the "Organization Settings" section or "Repositories" section +3. Click "Add Repositories" to connect your Git repositories +4. Use the UI to configure settings for each repository or at the organization level + +### Available UI Configuration Options: + +#### General Settings: +- Review Language: Choose the natural language for CodeRabbit to write reviews (e.g., English (US)) +- Tone Instructions: Set the tone for reviews and chat +- Early Access: Enable or disable early-access features +- Fine-tune Your Reviews: Allow CodeRabbit to learn from your usage and improve over time + +#### Review Settings: +- Customize review profile, summary options, and automated review preferences + +#### Chat Settings: +- Configure chat-related options + +#### Knowledge Base: +- Set up and manage your organization's knowledge base + +#### API Keys: +- Create and manage API keys for accessing the CodeRabbit API + +> **Note:** Settings configured at the repository level will override organization-level settings. + +## 2. Using a YAML Configuration File + +For more advanced and version-controlled configuration, you can use a YAML file in your repository. + +### Steps: +1. Create a file named `.coderabbit.yaml` in the root of your repository +2. Add your configuration options to the file +3. Commit and push the file to your repository + +### Sample `.coderabbit.yaml`: + +```yaml +# 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 +chat: + auto_reply: true +``` + +### Key Configuration Options: + +- `language`: Set the language for CodeRabbit's responses +- `early_access`: Enable/disable early access features +- `reviews`: Configure review behavior and style +- `chat`: Set chat-related options + +For a complete list of configuration options, refer to the [CodeRabbit Configuration Schema](https://coderabbit.ai/integrations/schema.v2.json). + +## Configuration Precedence + +CodeRabbit uses the following order of precedence for configuration: + +1. YAML file in the repository (highest precedence) +2. UI configuration for individual repositories +3. UI configuration for the organization (lowest precedence) + +## Tips + +- To convert existing UI configuration to YAML, use the `@coderabbitai configuration` command on any PR. +- Ensure the `.coderabbit.yaml` file is present in the feature branch for CodeRabbit to review. +- New pull requests or incremental commits will trigger CodeRabbit reviews once configured. + +## Table of Contents + +- [Getting Started](#getting-started) +- [Project Structure](#project-structure) +- [Local Development](#local-development) +- [Building for Production](#building-for-production) +- [Contributing](#contributing) + +## Getting Started + +1. Clone this repository: + +```bash +git clone https://github.com/coderabbit-ai/coderabbit-docs.git +cd coderabbit-docs +``` + +2. Install dependencies: + +```bash +npm install +``` + +3. Start the development server: + +```bash +docusaurus start +``` + +This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. + +## Project Structure + +``` +coderabbit-docs/ + ├── blog/ + ├── docs/ + ├── src/ + │ ├── components/ + │ ├── css/ + │ └── pages/ + ├── static/ + ├── docusaurus.config.ts + ├── sidebar.ts + └── package.json +``` + +## Local Development + +``` +docusaurus start +``` + +This command starts a local development server and opens up a browser window. + +## Building for Production + +``` +docusaurus build +``` + +This command generates static content into the `build` directory. + + +## Contributing + +We welcome contributions to improve our documentation. Here are some guidelines: + +1. Fork this repository +2. Create a new branch for your changes +3. Make all the changes +4. Test your changes locally +5. Submit a pull request with a clear description of what changes you did and why. + +For more detailed contributing guidelines, please see our [CONTRIBUTING.md](./CONTRIBUTING.md) file. + +--- + +For more information on using Docusaurus, please refer to the [official Docusaurus documentation](https://docusaurus.io/docs). + +Built with ❤️ by the CodeRabbit team \ No newline at end of file