Skip to content
Merged
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
50 changes: 50 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# .coderabbit.yaml for Open Source Bazaar 项目

# -----------------
# 核心设置
# -----------------

# 设置 CodeRabbit 回复的语言 (e.g., "en", "zh-CN")
language: "zh-CN"

# -----------------
# 审查配置
# -----------------

reviews:
# 高级摘要配置
high_level_summary: true
high_level_summary_placeholder: "这是 Open Source Bazaar 项目的 PR 变更摘要"

# 路径过滤 - 排除 Next.js 项目中不需要审查的文件和目录
path_filters:
- "src/**"
- "pages/**"
- "components/**"
- "models/**"
- "!**/*.md"
- "!**/*.{bin,csv}"
- "!node_modules/**"
- "!.next/**"
- "!public/**/*.{png,jpg,jpeg,gif,webp,svg,ico,mp4,mp3,woff,woff2,ttf,otf}"
- "!out/**"
- "!next-env.d.ts"
- "!package-lock.json"
- "!pnpm-lock.yaml"
- "!yarn.lock"
- "!**/__snapshots__/**"

# 代码生成指令
code_generation:
docstrings:
path_instructions:
"pages/**": "确保所有用户界面文本使用 t() 函数进行国际化翻译"
"components/**": "必须使用 React Bootstrap 组件替代自定义 HTML 元素"
"models/**": "检查 MobX store 的正确使用,包括 @observer、@observable、@action、@computed"

# 全局语气指令
tone_instructions: |
使用专业中文语气。重点关注:1) 统一用 React Bootstrap;2) MobX
observer/observable/action/computed 是否正确;3) 全部 UI 文本用 t();4) GitHub
API 认证/错误处理与 Base64 统一用 web-utility;5) Pages Router 的数据获取正确;
6) TypeScript 强类型;7) 性能(next/image、避免多余渲染);8) 结构清晰。