Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
language: en-GB

tone_instructions: |
Provide feedback in a professional, friendly, constructive and concise tone.
Offer clear, specific suggestions and best practices to help enhance the code
quality and promote learning.
Be concise and only comment on significant issues.

early_access: false

knowledge_base:
# Stop this repo's agent instructions becoming code guidelines for every repo
code_guidelines:
enabled: false
# `global` uses the organization's learnings,
learnings:
scope: global
issues:
scope: global
pull_requests:
scope: global

reviews:
profile: chill
high_level_summary: true
# Add the high-level summary into the walkthrough instead of the PR body
high_level_summary_in_walkthrough: true
# Don't post review details on each review.
review_status: false
review_info: false
commit_status: false
# Ensure the walkthrough is visible now that the summary is disabled
collapse_walkthrough: false
changed_files_summary: false
sequence_diagrams: false
estimate_code_review_effort: false
related_issues: false
related_prs: false
suggested_labels: false
suggested_reviewers: false
in_progress_fortune: false
poem: false
# Define path filters and instructions in the local repository
path_filters: []
path_instructions: []
auto_review:
# Keywords are case-insensitive
ignore_title_keywords:
- wip
- draft
- "chore(release):"
- "ci(trunk):"
ignore_usernames:
# Reduce noise as chazypro is not currently licensed
- chazypro
# Ignore bots as they perform automated tasks that do not require review
- 3ware[bot]
- github-actions[bot]
- renovate[bot]
finishing_touches:
autofix:
enabled: false
docstrings:
enabled: false
unit_tests:
enabled: false
pre_merge_checks:
docstrings:
mode: "off"
title:
# PR Check does this to ensure conventional commit syntax
mode: "off"
tools:
# Disable tools where Trunk (https://trunk.io) overlaps.
actionlint:
enabled: false
checkov:
enabled: false
markdownlint:
enabled: false
shellcheck:
enabled: false
trufflehog:
enabled: false
yamllint:
enabled: false
zizmor:
enabled: false
chat:
art: false
49 changes: 39 additions & 10 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,52 @@
# README Template
# Coderabbit Central Configuration

<!-- Replace with the project name and a one-line summary of what the repository does. -->
Defines standard Coderabbit configuration for 3ware repositories

<!-- Update the repository slug and CI workflow file name in the badges below. -->

[![GitHub release](https://img.shields.io/github/release/3ware/template-base?include_prereleases=&sort=semver&color=green)](https://github.com/3ware/template-base/releases/) [![issues - workflows](https://img.shields.io/github/issues/3ware/template-base)](https://github.com/3ware/template-base/issues) [![CI](https://img.shields.io/github/actions/workflow/status/3ware/template-base/pr-check.yaml?label=CI&logo=githubactions&logoColor=white)](https://github.com/3ware/template-base/actions/workflows/pr-check.yaml)
[![GitHub release](https://img.shields.io/github/release/3ware/coderabbit?include_prereleases=&sort=semver&color=green)](https://github.com/3ware/coderabbit/releases/) [![issues - workflows](https://img.shields.io/github/issues/3ware/coderabbit)](https://github.com/3ware/coderabbit/issues) [![CI](https://img.shields.io/github/actions/workflow/status/3ware/coderabbit/pr-check.yaml?label=CI&logo=githubactions&logoColor=white)](https://github.com/3ware/coderabbit/actions/workflows/pr-check.yaml)

## Configuration

<!-- Config files, environment variables and options with their defaults, plus an example snippet. -->
[.coderabbit.yaml](../.coderabbit.yaml) sets the org-wide defaults. Notable settings:

| Setting | Value | Reason |
| --------------------------------------------------------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| `language` | `en-GB` | |
| `reviews.profile` | `chill` | Only comment on significant issues |
| `knowledge_base.code_guidelines.enabled` | `false` | Stop this repository's agent instructions applying to every repository |
| `knowledge_base.*.scope` | `global` | Share learnings, issues and PRs across the org |
| `reviews.high_level_summary_in_walkthrough` | `true` | Moves high level summary to the walkthrough to avoid editing the PR body, which skips workflows that ignore `edited` events. |
| Extras (poem, fortune, diagrams, labels, reviewers, etc.) | disabled | Reduce noise |
| `reviews.auto_review.ignore_title_keywords` | `wip`, `draft`, `chore(release):`, `ci(trunk):` | Skip non-reviewable PRs |
| `reviews.pre_merge_checks.title` | `off` | PR titles are validated by the PR Check workflow |
| `reviews.tools` | actionlint, checkov, markdownlint, shellcheck, trufflehog, yamllint, zizmor disabled | Overlap with [Trunk](https://trunk.io) |
| `reviews.path_filters` / `path_instructions` | empty | Set these in the local repository |

## Requirements

<!-- Required tools with minimum versions, tokens or permissions, and supported platforms. -->
- The CodeRabbit GitHub App is installed on the `3ware` organisation and has access to both this repository and the repository being reviewed.
- This repository must stay named `coderabbit`. CodeRabbit looks it up by name.
- Repositories that rely on the disabled tools above should run [Trunk](https://trunk.io) instead.

## Usage

<!-- Minimal quick-start example, common scenarios and the expected output. -->

## Maintenance

<!-- How to update dependencies, the release process, CI checks, and who owns the repository. -->
Add a `.coderabbit.yaml` file to the root of your repository. As a minimum set `inheritance` to true and add `path_filters` and `path_instructions` to focus the reviews.

> [!IMPORTANT]
> Without a local `.coderabbit.yaml`, CodeRabbit doesn't read your repository's own `.github/copilot-instructions.md` or `.github/skills/<name>/SKILL.md`. A local config with `inheritance: true` keeps the central settings. Code guidelines are disabled centrally, so also set `knowledge_base.code_guidelines.enabled: true` to have CodeRabbit read your repository's own guideline files and skills. If you already use those agent instructions, consider omitting `path_instructions`.

```yaml
inheritance: true
knowledge_base:
code_guidelines:
enabled: true
reviews:
path_filters:
- iac/**
path_instructions:
- path: "**/*.tf"
instructions: |
Say what to check and what to flag. Concrete rules work better than general advice
Consider omitting this if it overlaps with coding guidelines.
```
37 changes: 37 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# CodeRabbit Central Configuration

This repository holds the org-wide [CodeRabbit](https://coderabbit.ai) defaults for the `3ware` GitHub organisation. CodeRabbit reads `.coderabbit.yaml` from a repository named exactly `coderabbit` and applies it to every 3ware repository that has no `.coderabbit.yaml` of its own. Repositories that add their own file with `inheritance: true` merge their settings over these defaults.

Changes here affect reviews across the whole organisation, so keep them deliberate and minimal.

## Tech stack

- CodeRabbit configuration in YAML - V2 schema only. CodeRabbit ignores a central file that declares `version: 3`.
- GitHub Actions, mostly calling reusable workflows from `3ware/workflows`.
- [Trunk](https://trunk.io) Code Quality (CLI 1.25.0) with plugins from `3ware/trunk-code-quality-plugins`.
- release-please (`simple` release type) for versioning and the changelog.
- Renovate, extending `local>3ware/renovate-config`.
- `gh actions-lock` for the actions lockfile.

## Guidelines

- Keep `reviews.path_filters` and `reviews.path_instructions` empty. Repositories set them in their own `.coderabbit.yaml`.
- Give every non-obvious setting a one-line comment saying why it is set.
- Don't enable CodeRabbit tools that overlap with Trunk (actionlint, checkov, markdownlint, shellcheck, trufflehog, yamllint, zizmor).
- Check every key against the [configuration reference](https://docs.coderabbit.ai/reference/configuration) before adding it. An invalid central file is ignored for every repository.
- Keep the Configuration table in `.github/README.md` in sync with `.coderabbit.yaml`.
- Follow `.editorconfig`: 2-space indentation, LF line endings and a final newline.
- Use British English spelling.

## Project structure

- `.coderabbit.yaml`: the central CodeRabbit configuration.
- `.github/README.md`: usage documentation for repositories consuming this configuration.
- `.github/renovate.json` and `.github/CODEOWNERS`: may need updating when the central configuration changes.
- Workflows, `.trunk/`, release-please files and `.vscode/` (except `mcp.json`) are standard across 3ware repositories. Leave them unchanged.

## Resources

- `trunk check` and `trunk fmt` lint and format changed files.
- Comment `@coderabbitai configuration` on a PR in another 3ware repository to see which configuration a review used.
- The `coderabbit-docs` MCP server (configured in `.vscode/mcp.json`) searches the CodeRabbit documentation. Use it to check configuration keys and behaviour.
1 change: 1 addition & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"words": [
"chazypro",
"coderabbit",
"coderabbitai",
"docstrings",
"pullrequest",
"shellcheck",
Expand Down
8 changes: 8 additions & 0 deletions .vscode/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"servers": {
"coderabbit-docs": {
"type": "http",
"url": "https://docs.coderabbit.ai/mcp"
}
}
}