@alibaba-group/open-code-review 1.3.14 → 1.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja-JP.md +1 -1
- package/README.ko-KR.md +1 -1
- package/README.md +1 -1
- package/README.ru-RU.md +1 -1
- package/README.zh-CN.md +1 -1
- package/bin/ocr.js +10 -2
- package/package.json +16 -1
- package/scripts/install.js +8 -2
- package/scripts/platform.js +66 -0
- package/scripts/update.js +6 -0
- package/.claude-plugin/marketplace.json +0 -16
- package/CONTRIBUTING.ja-JP.md +0 -218
- package/CONTRIBUTING.ko-KR.md +0 -223
- package/CONTRIBUTING.md +0 -224
- package/CONTRIBUTING.ru-RU.md +0 -224
- package/CONTRIBUTING.zh-CN.md +0 -218
- package/examples/README.md +0 -10
- package/examples/github_actions/README.md +0 -223
- package/examples/github_actions/ocr-review.yml +0 -357
- package/examples/gitlab_ci/.gitlab-ci.yml +0 -244
- package/examples/gitlab_ci/README.md +0 -269
- package/plugins/open-code-review/.claude-plugin/plugin.json +0 -6
- package/plugins/open-code-review/.codex-plugin/plugin.json +0 -34
- package/plugins/open-code-review/CODEX.ko-KR.md +0 -108
- package/plugins/open-code-review/commands/review.md +0 -35
- package/plugins/open-code-review/skills/open-code-review/SKILL.md +0 -236
- package/scripts/github-actions/post-review-comments.test.js +0 -171
- package/skills/open-code-review/SKILL.md +0 -231
package/CONTRIBUTING.md
DELETED
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
# Contributing to OpenCodeReview
|
|
2
|
-
|
|
3
|
-
Thank you for your interest in contributing to OpenCodeReview! Every contribution matters — whether it's fixing a typo, reporting a bug, or implementing a new feature.
|
|
4
|
-
|
|
5
|
-
[简体中文版](CONTRIBUTING.zh-CN.md) | [日本語版](CONTRIBUTING.ja-JP.md) | [한국어](CONTRIBUTING.ko-KR.md) | [Русский](CONTRIBUTING.ru-RU.md)
|
|
6
|
-
|
|
7
|
-
## Code of Conduct
|
|
8
|
-
|
|
9
|
-
By participating in this project, you agree to maintain a respectful and inclusive environment. Please be kind and constructive in all interactions.
|
|
10
|
-
|
|
11
|
-
## Ways to Contribute
|
|
12
|
-
|
|
13
|
-
There are many ways to contribute beyond writing code:
|
|
14
|
-
|
|
15
|
-
- **Report bugs** — Found something broken? Open an issue with reproduction steps.
|
|
16
|
-
- **Suggest features** — Have an idea for improvement? You can start a conversation in [GitHub Discussions](https://github.com/alibaba/open-code-review/discussions/categories/ideas) or open a [Feature Request](https://github.com/alibaba/open-code-review/issues/new?template=feature_request.yml) issue.
|
|
17
|
-
- **Improve documentation** — Fix typos, clarify explanations, or add examples. You can also open a [Documentation Issue](https://github.com/alibaba/open-code-review/issues/new?template=docs_report.yml) to report problems.
|
|
18
|
-
- **Review pull requests** — Help us review code from other contributors.
|
|
19
|
-
- **Write code** — Fix bugs, add features, or improve performance.
|
|
20
|
-
|
|
21
|
-
## Getting Started
|
|
22
|
-
|
|
23
|
-
### Prerequisites
|
|
24
|
-
|
|
25
|
-
- [Go 1.25+](https://go.dev/dl/)
|
|
26
|
-
- [Git](https://git-scm.com/)
|
|
27
|
-
- [Make](https://www.gnu.org/software/make/)
|
|
28
|
-
|
|
29
|
-
### Setup
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
# 1. Fork the repository on GitHub
|
|
33
|
-
|
|
34
|
-
# 2. Clone your fork
|
|
35
|
-
git clone https://github.com/<your-username>/open-code-review.git
|
|
36
|
-
cd open-code-review
|
|
37
|
-
|
|
38
|
-
# 3. Add upstream remote (for syncing updates from the main repo)
|
|
39
|
-
git remote add upstream https://github.com/alibaba/open-code-review.git
|
|
40
|
-
|
|
41
|
-
# 4. Build the project
|
|
42
|
-
make build
|
|
43
|
-
|
|
44
|
-
# 5. Run tests
|
|
45
|
-
make test
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
If everything passes, you're ready to contribute.
|
|
49
|
-
|
|
50
|
-
> **Note:** The `upstream` remote is read-only for contributors — it is used to pull the latest changes from the main repository. You cannot push directly to upstream. All contributions must be pushed to your fork (`origin`) and submitted via Pull Request.
|
|
51
|
-
|
|
52
|
-
## Development Workflow
|
|
53
|
-
|
|
54
|
-
### Branching
|
|
55
|
-
|
|
56
|
-
Create a feature branch from `main`:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
git checkout main
|
|
60
|
-
git pull upstream main
|
|
61
|
-
git checkout -b feat/your-feature-name
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Use prefixes to indicate the type of change:
|
|
65
|
-
|
|
66
|
-
| Prefix | Purpose |
|
|
67
|
-
| ----------- | ------------------------------------- |
|
|
68
|
-
| `feat/` | New feature |
|
|
69
|
-
| `fix/` | Bug fix |
|
|
70
|
-
| `docs/` | Documentation only |
|
|
71
|
-
| `refactor/` | Code refactoring (no behavior change) |
|
|
72
|
-
| `test/` | Adding or updating tests |
|
|
73
|
-
| `chore/` | Build, CI, or tooling changes |
|
|
74
|
-
|
|
75
|
-
### Commit Messages
|
|
76
|
-
|
|
77
|
-
Follow [Conventional Commits](https://www.conventionalcommits.org/) format:
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
<type>(<scope>): <short summary>
|
|
81
|
-
|
|
82
|
-
[optional body]
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Examples:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
feat(agent): add support for custom tool definitions
|
|
89
|
-
fix(llm): handle timeout errors in Anthropic API calls
|
|
90
|
-
docs(README): update configuration examples
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Code Quality
|
|
94
|
-
|
|
95
|
-
Before submitting your changes, make sure they pass all checks:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
# Format and lint (Go standard tooling)
|
|
99
|
-
go fmt ./...
|
|
100
|
-
go vet ./...
|
|
101
|
-
|
|
102
|
-
# Run tests with race detection
|
|
103
|
-
make test
|
|
104
|
-
|
|
105
|
-
# Build successfully
|
|
106
|
-
make build
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Project Structure
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
├── cmd/opencodereview/ # CLI entry point
|
|
113
|
-
├── internal/
|
|
114
|
-
│ ├── agent/ # Review agent logic
|
|
115
|
-
│ ├── config/ # Configuration management
|
|
116
|
-
│ ├── diff/ # Git diff parsing
|
|
117
|
-
│ ├── llm/ # LLM API client (Anthropic & OpenAI)
|
|
118
|
-
│ ├── model/ # Data models
|
|
119
|
-
│ ├── session/ # Review session management
|
|
120
|
-
│ ├── tool/ # Built-in tools (file_read, code_search, etc.)
|
|
121
|
-
│ ├── telemetry/ # OpenTelemetry integration
|
|
122
|
-
│ └── viewer/ # WebUI session viewer
|
|
123
|
-
├── pages/ # WebUI frontend
|
|
124
|
-
├── scripts/ # Build & install scripts
|
|
125
|
-
└── bin/ # NPM wrapper
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Contributing to Documentation
|
|
129
|
-
|
|
130
|
-
Documentation is a crucial part of OpenCodeReview. We welcome improvements to README files, inline code comments, configuration examples, and any user-facing text.
|
|
131
|
-
|
|
132
|
-
### What Counts as a Documentation Contribution
|
|
133
|
-
|
|
134
|
-
- Fixing typos, grammar errors, or broken links
|
|
135
|
-
- Clarifying confusing explanations or adding missing context
|
|
136
|
-
- Adding usage examples for commands or configuration options
|
|
137
|
-
- Updating outdated content (e.g., after a feature change)
|
|
138
|
-
- Translating or improving localized documentation (`README.zh-CN.md`, `README.ja-JP.md`, `README.ko-KR.md`, `README.ru-RU.md`, `CONTRIBUTING.zh-CN.md`, `CONTRIBUTING.ja-JP.md`, `CONTRIBUTING.ko-KR.md`, `CONTRIBUTING.ru-RU.md`)
|
|
139
|
-
|
|
140
|
-
### Documentation Workflow
|
|
141
|
-
|
|
142
|
-
1. If you spot an issue but don't plan to fix it yourself, open a [Documentation Issue](https://github.com/alibaba/open-code-review/issues/new?template=docs_report.yml).
|
|
143
|
-
2. If you'd like to fix it, fork the repo, make your changes, and submit a PR with the `docs/` branch prefix (e.g., `docs/fix-config-example`).
|
|
144
|
-
3. Documentation-only PRs don't require test changes, but please verify that any commands or code snippets you include are accurate.
|
|
145
|
-
|
|
146
|
-
### Documentation Files
|
|
147
|
-
|
|
148
|
-
| File | Purpose |
|
|
149
|
-
| ----------------------- | ------------------------------------ |
|
|
150
|
-
| `README.md` | Main project documentation (English) |
|
|
151
|
-
| `README.zh-CN.md` | Chinese translation |
|
|
152
|
-
| `README.ja-JP.md` | Japanese translation |
|
|
153
|
-
| `README.ko-KR.md` | Korean translation |
|
|
154
|
-
| `README.ru-RU.md` | Russian translation |
|
|
155
|
-
| `CONTRIBUTING.md` | Contribution guide (English) |
|
|
156
|
-
| `CONTRIBUTING.zh-CN.md` | Contribution guide (Chinese) |
|
|
157
|
-
| `CONTRIBUTING.ja-JP.md` | Contribution guide (Japanese) |
|
|
158
|
-
| `CONTRIBUTING.ko-KR.md` | Contribution guide (Korean) |
|
|
159
|
-
| `CONTRIBUTING.ru-RU.md` | Contribution guide (Russian) |
|
|
160
|
-
|
|
161
|
-
## Submitting Changes
|
|
162
|
-
|
|
163
|
-
### Opening an Issue
|
|
164
|
-
|
|
165
|
-
Before working on a significant change, please open an issue first to discuss the approach. This prevents duplicate work and ensures your contribution aligns with the project's direction.
|
|
166
|
-
|
|
167
|
-
When reporting a bug, include:
|
|
168
|
-
|
|
169
|
-
1. OpenCodeReview version (`ocr version`)
|
|
170
|
-
2. OS and architecture
|
|
171
|
-
3. Steps to reproduce
|
|
172
|
-
4. Expected vs. actual behavior
|
|
173
|
-
5. Relevant logs or error messages
|
|
174
|
-
|
|
175
|
-
### Pull Request Process
|
|
176
|
-
|
|
177
|
-
1. **Keep PRs focused** — One logical change per PR. If you have multiple independent changes, submit separate PRs.
|
|
178
|
-
2. **Write tests** — Add or update tests for any behavior changes.
|
|
179
|
-
3. **Update docs** — If your change affects user-facing behavior, update the relevant documentation.
|
|
180
|
-
4. **Sign the CLA** — All contributors must sign the Contributor License Agreement before their PR can be merged (see below).
|
|
181
|
-
5. **Fill in the PR template** — Describe what your change does and why.
|
|
182
|
-
|
|
183
|
-
### PR Title Format
|
|
184
|
-
|
|
185
|
-
Use the same Conventional Commits format as commit messages:
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
feat(agent): add support for custom tool definitions
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Review Process
|
|
192
|
-
|
|
193
|
-
- A maintainer will review your PR, usually within a few business days.
|
|
194
|
-
- We may request changes — this is normal and collaborative, not adversarial.
|
|
195
|
-
- Once approved, a maintainer will merge your PR.
|
|
196
|
-
|
|
197
|
-
## Contributor License Agreement (CLA)
|
|
198
|
-
|
|
199
|
-
We require all contributors to sign the Alibaba Open Source Contributor License Agreement before we can merge your contributions. This ensures that the project can be distributed under its license terms.
|
|
200
|
-
|
|
201
|
-
When you open your first PR, a CLA bot will post a comment with instructions. Simply follow the link to sign electronically — it only takes a minute.
|
|
202
|
-
|
|
203
|
-
## First-Time Contributors
|
|
204
|
-
|
|
205
|
-
New to the project? Look for issues labeled:
|
|
206
|
-
|
|
207
|
-
- [`good first issue`](https://github.com/alibaba/open-code-review/labels/good%20first%20issue) — Small, well-scoped tasks ideal for getting started.
|
|
208
|
-
- [`help wanted`](https://github.com/alibaba/open-code-review/labels/help%20wanted) — Issues where we'd appreciate community help.
|
|
209
|
-
|
|
210
|
-
Some good areas to start:
|
|
211
|
-
|
|
212
|
-
- Improving error messages and CLI output
|
|
213
|
-
- Writing tests for untested code paths
|
|
214
|
-
- Documentation improvements
|
|
215
|
-
|
|
216
|
-
## Community
|
|
217
|
-
|
|
218
|
-
- **Bug Reports** — [GitHub Issues](https://github.com/alibaba/open-code-review/issues)
|
|
219
|
-
- **Feature Suggestions** — [GitHub Discussions (Ideas)](https://github.com/alibaba/open-code-review/discussions/categories/ideas) or [Feature Request Issue](https://github.com/alibaba/open-code-review/issues/new?template=feature_request.yml)
|
|
220
|
-
- **Questions & Help** — If you have any questions about using OpenCodeReview, feel free to ask in [GitHub Discussions](https://github.com/alibaba/open-code-review/discussions)
|
|
221
|
-
|
|
222
|
-
## License
|
|
223
|
-
|
|
224
|
-
By contributing to OpenCodeReview, you agree that your contributions will be licensed under the [Apache License 2.0](LICENSE).
|
package/CONTRIBUTING.ru-RU.md
DELETED
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
# Участие в разработке OpenCodeReview
|
|
2
|
-
|
|
3
|
-
Спасибо за интерес к развитию OpenCodeReview! Важен любой вклад — будь то исправленная опечатка, сообщение о баге или новая функциональность.
|
|
4
|
-
|
|
5
|
-
[English](CONTRIBUTING.md) | [简体中文版](CONTRIBUTING.zh-CN.md) | [日本語版](CONTRIBUTING.ja-JP.md) | [한국어](CONTRIBUTING.ko-KR.md) | Русский
|
|
6
|
-
|
|
7
|
-
## Кодекс поведения
|
|
8
|
-
|
|
9
|
-
Участвуя в этом проекте, вы соглашаетесь поддерживать уважительную и инклюзивную атмосферу. Пожалуйста, будьте доброжелательны и конструктивны в любом взаимодействии.
|
|
10
|
-
|
|
11
|
-
## Как можно помочь
|
|
12
|
-
|
|
13
|
-
Помимо написания кода, есть много способов внести вклад:
|
|
14
|
-
|
|
15
|
-
- **Сообщайте о багах** — нашли поломку? Заведите issue с шагами воспроизведения.
|
|
16
|
-
- **Предлагайте улучшения** — есть идея? Начните обсуждение в [GitHub Discussions](https://github.com/alibaba/open-code-review/discussions/categories/ideas) или заведите issue [Feature Request](https://github.com/alibaba/open-code-review/issues/new?template=feature_request.yml).
|
|
17
|
-
- **Улучшайте документацию** — исправляйте опечатки, проясняйте формулировки, добавляйте примеры. Чтобы сообщить о проблеме, можно также завести [Documentation Issue](https://github.com/alibaba/open-code-review/issues/new?template=docs_report.yml).
|
|
18
|
-
- **Ревьюйте pull request'ы** — помогайте нам проверять код других контрибьюторов.
|
|
19
|
-
- **Пишите код** — исправляйте баги, добавляйте функциональность, улучшайте производительность.
|
|
20
|
-
|
|
21
|
-
## С чего начать
|
|
22
|
-
|
|
23
|
-
### Требования
|
|
24
|
-
|
|
25
|
-
- [Go 1.25+](https://go.dev/dl/)
|
|
26
|
-
- [Git](https://git-scm.com/)
|
|
27
|
-
- [Make](https://www.gnu.org/software/make/)
|
|
28
|
-
|
|
29
|
-
### Настройка
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
# 1. Сделайте форк репозитория на GitHub
|
|
33
|
-
|
|
34
|
-
# 2. Склонируйте свой форк
|
|
35
|
-
git clone https://github.com/<your-username>/open-code-review.git
|
|
36
|
-
cd open-code-review
|
|
37
|
-
|
|
38
|
-
# 3. Добавьте remote upstream (для синхронизации с основным репозиторием)
|
|
39
|
-
git remote add upstream https://github.com/alibaba/open-code-review.git
|
|
40
|
-
|
|
41
|
-
# 4. Соберите проект
|
|
42
|
-
make build
|
|
43
|
-
|
|
44
|
-
# 5. Запустите тесты
|
|
45
|
-
make test
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Если всё прошло успешно — вы готовы контрибьютить.
|
|
49
|
-
|
|
50
|
-
> **Примечание:** remote `upstream` для контрибьюторов доступен только на чтение — он используется, чтобы подтягивать свежие изменения из основного репозитория. Пушить напрямую в upstream нельзя. Все изменения отправляются в ваш форк (`origin`) и подаются через Pull Request.
|
|
51
|
-
|
|
52
|
-
## Процесс разработки
|
|
53
|
-
|
|
54
|
-
### Ветки
|
|
55
|
-
|
|
56
|
-
Создайте feature-ветку от `main`:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
git checkout main
|
|
60
|
-
git pull upstream main
|
|
61
|
-
git checkout -b feat/your-feature-name
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Используйте префиксы, обозначающие тип изменения:
|
|
65
|
-
|
|
66
|
-
| Префикс | Назначение |
|
|
67
|
-
| ----------- | --------------------------------------- |
|
|
68
|
-
| `feat/` | Новая функциональность |
|
|
69
|
-
| `fix/` | Исправление бага |
|
|
70
|
-
| `docs/` | Только документация |
|
|
71
|
-
| `refactor/` | Рефакторинг (без изменения поведения) |
|
|
72
|
-
| `test/` | Добавление или обновление тестов |
|
|
73
|
-
| `chore/` | Сборка, CI или инструментарий |
|
|
74
|
-
|
|
75
|
-
### Сообщения коммитов
|
|
76
|
-
|
|
77
|
-
Следуйте формату [Conventional Commits](https://www.conventionalcommits.org/):
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
<type>(<scope>): <краткое описание>
|
|
81
|
-
|
|
82
|
-
[необязательное тело]
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Примеры:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
feat(agent): add support for custom tool definitions
|
|
89
|
-
fix(llm): handle timeout errors in Anthropic API calls
|
|
90
|
-
docs(README): update configuration examples
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Качество кода
|
|
94
|
-
|
|
95
|
-
Перед отправкой изменений убедитесь, что они проходят все проверки:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
# Форматирование и линт (стандартный инструментарий Go)
|
|
99
|
-
go fmt ./...
|
|
100
|
-
go vet ./...
|
|
101
|
-
|
|
102
|
-
# Тесты с детектором гонок
|
|
103
|
-
make test
|
|
104
|
-
|
|
105
|
-
# Успешная сборка
|
|
106
|
-
make build
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Структура проекта
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
├── cmd/opencodereview/ # Точка входа CLI
|
|
113
|
-
├── internal/
|
|
114
|
-
│ ├── agent/ # Логика ревью-агента
|
|
115
|
-
│ ├── config/ # Управление конфигурацией
|
|
116
|
-
│ ├── diff/ # Разбор git-диффов
|
|
117
|
-
│ ├── llm/ # Клиент LLM API (Anthropic и OpenAI)
|
|
118
|
-
│ ├── model/ # Модели данных
|
|
119
|
-
│ ├── session/ # Управление сессиями ревью
|
|
120
|
-
│ ├── tool/ # Встроенные инструменты (file_read, code_search и др.)
|
|
121
|
-
│ ├── telemetry/ # Интеграция с OpenTelemetry
|
|
122
|
-
│ └── viewer/ # WebUI-просмотрщик сессий
|
|
123
|
-
├── pages/ # Фронтенд WebUI
|
|
124
|
-
├── scripts/ # Скрипты сборки и установки
|
|
125
|
-
└── bin/ # NPM-обёртка
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Вклад в документацию
|
|
129
|
-
|
|
130
|
-
Документация — важнейшая часть OpenCodeReview. Мы приветствуем улучшения README-файлов, комментариев в коде, примеров конфигурации и любых текстов, обращённых к пользователю.
|
|
131
|
-
|
|
132
|
-
### Что считается вкладом в документацию
|
|
133
|
-
|
|
134
|
-
- Исправление опечаток, грамматических ошибок и битых ссылок
|
|
135
|
-
- Прояснение запутанных объяснений и добавление недостающего контекста
|
|
136
|
-
- Добавление примеров использования команд и параметров конфигурации
|
|
137
|
-
- Обновление устаревшего содержимого (например, после изменения функциональности)
|
|
138
|
-
- Перевод и улучшение локализованной документации (`README.zh-CN.md`, `README.ja-JP.md`, `README.ko-KR.md`, `README.ru-RU.md`, `CONTRIBUTING.zh-CN.md`, `CONTRIBUTING.ja-JP.md`, `CONTRIBUTING.ko-KR.md`, `CONTRIBUTING.ru-RU.md`)
|
|
139
|
-
|
|
140
|
-
### Процесс работы с документацией
|
|
141
|
-
|
|
142
|
-
1. Если вы заметили проблему, но не планируете исправлять её сами, заведите [Documentation Issue](https://github.com/alibaba/open-code-review/issues/new?template=docs_report.yml).
|
|
143
|
-
2. Если хотите исправить сами — сделайте форк, внесите изменения и подайте PR с префиксом ветки `docs/` (например, `docs/fix-config-example`).
|
|
144
|
-
3. PR, затрагивающие только документацию, не требуют изменений в тестах, но, пожалуйста, проверяйте точность всех приводимых команд и фрагментов кода.
|
|
145
|
-
|
|
146
|
-
### Файлы документации
|
|
147
|
-
|
|
148
|
-
| Файл | Назначение |
|
|
149
|
-
| ----------------------- | ------------------------------------------- |
|
|
150
|
-
| `README.md` | Основная документация проекта (английский) |
|
|
151
|
-
| `README.zh-CN.md` | Китайский перевод |
|
|
152
|
-
| `README.ja-JP.md` | Японский перевод |
|
|
153
|
-
| `README.ko-KR.md` | Корейский перевод |
|
|
154
|
-
| `README.ru-RU.md` | Русский перевод |
|
|
155
|
-
| `CONTRIBUTING.md` | Руководство контрибьютора (английский) |
|
|
156
|
-
| `CONTRIBUTING.zh-CN.md` | Руководство контрибьютора (китайский) |
|
|
157
|
-
| `CONTRIBUTING.ja-JP.md` | Руководство контрибьютора (японский) |
|
|
158
|
-
| `CONTRIBUTING.ko-KR.md` | Руководство контрибьютора (корейский) |
|
|
159
|
-
| `CONTRIBUTING.ru-RU.md` | Руководство контрибьютора (русский) |
|
|
160
|
-
|
|
161
|
-
## Отправка изменений
|
|
162
|
-
|
|
163
|
-
### Заведение issue
|
|
164
|
-
|
|
165
|
-
Прежде чем браться за существенное изменение, пожалуйста, сначала заведите issue и обсудите подход. Это предотвращает дублирование работы и гарантирует, что ваш вклад согласуется с направлением развития проекта.
|
|
166
|
-
|
|
167
|
-
Сообщая о баге, укажите:
|
|
168
|
-
|
|
169
|
-
1. Версию OpenCodeReview (`ocr version`)
|
|
170
|
-
2. ОС и архитектуру
|
|
171
|
-
3. Шаги воспроизведения
|
|
172
|
-
4. Ожидаемое и фактическое поведение
|
|
173
|
-
5. Релевантные логи или сообщения об ошибках
|
|
174
|
-
|
|
175
|
-
### Процесс Pull Request
|
|
176
|
-
|
|
177
|
-
1. **Держите PR сфокусированным** — одно логическое изменение на PR. Несколько независимых изменений лучше подать отдельными PR.
|
|
178
|
-
2. **Пишите тесты** — добавляйте или обновляйте тесты при любых изменениях поведения.
|
|
179
|
-
3. **Обновляйте документацию** — если изменение затрагивает видимое пользователю поведение, обновите соответствующую документацию.
|
|
180
|
-
4. **Подпишите CLA** — прежде чем PR может быть принят, все контрибьюторы должны подписать Contributor License Agreement (см. ниже).
|
|
181
|
-
5. **Заполните шаблон PR** — опишите, что делает ваше изменение и зачем оно нужно.
|
|
182
|
-
|
|
183
|
-
### Формат заголовка PR
|
|
184
|
-
|
|
185
|
-
Используйте тот же формат Conventional Commits, что и для сообщений коммитов:
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
feat(agent): add support for custom tool definitions
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Процесс ревью
|
|
192
|
-
|
|
193
|
-
- Мейнтейнер посмотрит ваш PR — обычно в течение нескольких рабочих дней.
|
|
194
|
-
- Мы можем попросить внести изменения — это нормальная совместная работа, а не противостояние.
|
|
195
|
-
- После одобрения мейнтейнер смёржит ваш PR.
|
|
196
|
-
|
|
197
|
-
## Лицензионное соглашение контрибьютора (CLA)
|
|
198
|
-
|
|
199
|
-
Прежде чем мы сможем принять ваш вклад, необходимо подписать Alibaba Open Source Contributor License Agreement. Это гарантирует, что проект может распространяться на условиях своей лицензии.
|
|
200
|
-
|
|
201
|
-
Когда вы откроете свой первый PR, CLA-бот оставит комментарий с инструкциями. Просто перейдите по ссылке и подпишите соглашение электронно — это занимает минуту.
|
|
202
|
-
|
|
203
|
-
## Новичкам
|
|
204
|
-
|
|
205
|
-
Впервые в проекте? Ищите issues с метками:
|
|
206
|
-
|
|
207
|
-
- [`good first issue`](https://github.com/alibaba/open-code-review/labels/good%20first%20issue) — небольшие, хорошо очерченные задачи, идеальные для старта.
|
|
208
|
-
- [`help wanted`](https://github.com/alibaba/open-code-review/labels/help%20wanted) — задачи, где мы будем рады помощи сообщества.
|
|
209
|
-
|
|
210
|
-
С чего удобно начать:
|
|
211
|
-
|
|
212
|
-
- Улучшение сообщений об ошибках и вывода CLI
|
|
213
|
-
- Написание тестов для непокрытых участков кода
|
|
214
|
-
- Улучшение документации
|
|
215
|
-
|
|
216
|
-
## Сообщество
|
|
217
|
-
|
|
218
|
-
- **Сообщения о багах** — [GitHub Issues](https://github.com/alibaba/open-code-review/issues)
|
|
219
|
-
- **Предложения функциональности** — [GitHub Discussions (Ideas)](https://github.com/alibaba/open-code-review/discussions/categories/ideas) или issue [Feature Request](https://github.com/alibaba/open-code-review/issues/new?template=feature_request.yml)
|
|
220
|
-
- **Вопросы и помощь** — если у вас есть вопросы об использовании OpenCodeReview, задавайте их в [GitHub Discussions](https://github.com/alibaba/open-code-review/discussions)
|
|
221
|
-
|
|
222
|
-
## Лицензия
|
|
223
|
-
|
|
224
|
-
Внося вклад в OpenCodeReview, вы соглашаетесь с тем, что ваш вклад будет лицензирован на условиях [Apache License 2.0](LICENSE).
|
package/CONTRIBUTING.zh-CN.md
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
# 贡献指南
|
|
2
|
-
|
|
3
|
-
感谢你对 OpenCodeReview 的关注!无论是修复拼写错误、报告 Bug,还是实现新功能,每一份贡献都很有价值。
|
|
4
|
-
|
|
5
|
-
[English version](CONTRIBUTING.md) | [日本語版](CONTRIBUTING.ja-JP.md) | [한국어](CONTRIBUTING.ko-KR.md) | [Русский](CONTRIBUTING.ru-RU.md)
|
|
6
|
-
|
|
7
|
-
## 行为准则
|
|
8
|
-
|
|
9
|
-
参与本项目即表示你同意维护一个尊重和包容的环境。请在所有交流中保持友善和建设性。
|
|
10
|
-
|
|
11
|
-
## 贡献方式
|
|
12
|
-
|
|
13
|
-
除了写代码,还有很多方式可以参与贡献:
|
|
14
|
-
|
|
15
|
-
- **报告 Bug** — 发现问题?请提交 issue 并附上复现步骤。
|
|
16
|
-
- **建议功能** — 有改进想法?可以在 [GitHub Discussions](https://github.com/alibaba/open-code-review/discussions/categories/ideas) 中发起讨论,或直接提交一个 [Feature Request](https://github.com/alibaba/open-code-review/issues/new?template=feature_request.yml) issue。
|
|
17
|
-
- **改进文档** — 修复错别字、完善说明或补充示例。也可以提交一个 [Documentation Issue](https://github.com/alibaba/open-code-review/issues/new?template=docs_report.yml) 来报告文档问题。
|
|
18
|
-
- **审查 PR** — 帮助我们审查其他贡献者的代码。
|
|
19
|
-
- **编写代码** — 修复 Bug、添加功能或提升性能。
|
|
20
|
-
|
|
21
|
-
## 快速开始
|
|
22
|
-
|
|
23
|
-
### 前置条件
|
|
24
|
-
|
|
25
|
-
- [Go 1.25+](https://go.dev/dl/)
|
|
26
|
-
- [Git](https://git-scm.com/)
|
|
27
|
-
- [Make](https://www.gnu.org/software/make/)
|
|
28
|
-
|
|
29
|
-
### 环境搭建
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
# 1. 在 GitHub 上 Fork 本仓库
|
|
33
|
-
|
|
34
|
-
# 2. 克隆你的 Fork
|
|
35
|
-
git clone https://github.com/<你的用户名>/open-code-review.git
|
|
36
|
-
cd open-code-review
|
|
37
|
-
|
|
38
|
-
# 3. 添加上游远端(用于同步主仓库的最新变更)
|
|
39
|
-
git remote add upstream https://github.com/alibaba/open-code-review.git
|
|
40
|
-
|
|
41
|
-
# 4. 构建项目
|
|
42
|
-
make build
|
|
43
|
-
|
|
44
|
-
# 5. 运行测试
|
|
45
|
-
make test
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
如果一切通过,就可以开始贡献了。
|
|
49
|
-
|
|
50
|
-
> **注意:** `upstream` 远端对贡献者是只读的,仅用于拉取主仓库的最新更新。你不能直接向 upstream 推送代码,所有贡献必须推送到你的 fork(`origin`),然后通过 Pull Request 提交。
|
|
51
|
-
|
|
52
|
-
## 开发工作流
|
|
53
|
-
|
|
54
|
-
### 分支管理
|
|
55
|
-
|
|
56
|
-
从 `main` 创建功能分支:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
git checkout main
|
|
60
|
-
git pull upstream main
|
|
61
|
-
git checkout -b feat/your-feature-name
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
使用前缀标明变更类型:
|
|
65
|
-
|
|
66
|
-
| 前缀 | 用途 |
|
|
67
|
-
| ----------- | ---------------------- |
|
|
68
|
-
| `feat/` | 新功能 |
|
|
69
|
-
| `fix/` | Bug 修复 |
|
|
70
|
-
| `docs/` | 仅文档变更 |
|
|
71
|
-
| `refactor/` | 代码重构(无行为变化) |
|
|
72
|
-
| `test/` | 添加或更新测试 |
|
|
73
|
-
| `chore/` | 构建、CI 或工具链变更 |
|
|
74
|
-
|
|
75
|
-
### 提交信息
|
|
76
|
-
|
|
77
|
-
遵循 [Conventional Commits](https://www.conventionalcommits.org/) 规范:
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
<type>(<scope>): <简短描述>
|
|
81
|
-
|
|
82
|
-
[可选的详细说明]
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
示例:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
feat(agent): add support for custom tool definitions
|
|
89
|
-
fix(llm): handle timeout errors in Anthropic API calls
|
|
90
|
-
docs(README): update configuration examples
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### 代码质量
|
|
94
|
-
|
|
95
|
-
提交前请确保通过以下检查:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
# 格式化和静态检查
|
|
99
|
-
go fmt ./...
|
|
100
|
-
go vet ./...
|
|
101
|
-
|
|
102
|
-
# 带竞态检测运行测试
|
|
103
|
-
make test
|
|
104
|
-
|
|
105
|
-
# 构建成功
|
|
106
|
-
make build
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 项目结构
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
├── cmd/opencodereview/ # CLI 入口
|
|
113
|
-
├── internal/
|
|
114
|
-
│ ├── agent/ # 评审 Agent 逻辑
|
|
115
|
-
│ ├── config/ # 配置管理
|
|
116
|
-
│ ├── diff/ # Git diff 解析
|
|
117
|
-
│ ├── llm/ # LLM API 客户端(Anthropic & OpenAI)
|
|
118
|
-
│ ├── model/ # 数据模型
|
|
119
|
-
│ ├── session/ # 评审会话管理
|
|
120
|
-
│ ├── tool/ # 内置工具(file_read, code_search 等)
|
|
121
|
-
│ ├── telemetry/ # OpenTelemetry 集成
|
|
122
|
-
│ └── viewer/ # WebUI 会话查看器
|
|
123
|
-
├── pages/ # WebUI 前端
|
|
124
|
-
├── scripts/ # 构建和安装脚本
|
|
125
|
-
└── bin/ # NPM 包装器
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## 文档贡献
|
|
129
|
-
|
|
130
|
-
文档是 OpenCodeReview 的重要组成部分。我们欢迎对 README、代码注释、配置示例以及任何面向用户的文本进行改进。
|
|
131
|
-
|
|
132
|
-
### 哪些算文档贡献
|
|
133
|
-
|
|
134
|
-
- 修复错别字、语法错误或失效链接
|
|
135
|
-
- 完善表述不清的说明或补充缺失的上下文
|
|
136
|
-
- 为命令或配置项添加使用示例
|
|
137
|
-
- 更新过时的内容(例如功能变更后的文档同步)
|
|
138
|
-
- 翻译或改进中英文文档(`README.zh-CN.md`、`CONTRIBUTING.zh-CN.md`)
|
|
139
|
-
|
|
140
|
-
### 文档贡献流程
|
|
141
|
-
|
|
142
|
-
1. 如果你发现问题但暂时不打算自己修复,请提交一个 [Documentation Issue](https://github.com/alibaba/open-code-review/issues/new?template=docs_report.yml)。
|
|
143
|
-
2. 如果你想直接修复,fork 仓库后修改,提交 PR 时使用 `docs/` 分支前缀(例如 `docs/fix-config-example`)。
|
|
144
|
-
3. 纯文档 PR 不需要修改测试,但请确保文中涉及的命令和代码片段准确无误。
|
|
145
|
-
|
|
146
|
-
### 文档文件一览
|
|
147
|
-
|
|
148
|
-
| 文件 | 用途 |
|
|
149
|
-
| ----------------------- | -------------------- |
|
|
150
|
-
| `README.md` | 项目主文档(英文) |
|
|
151
|
-
| `README.zh-CN.md` | 中文翻译 |
|
|
152
|
-
| `CONTRIBUTING.md` | 贡献指南(英文) |
|
|
153
|
-
| `CONTRIBUTING.zh-CN.md` | 贡献指南(中文) |
|
|
154
|
-
|
|
155
|
-
## 提交变更
|
|
156
|
-
|
|
157
|
-
### 提交 Issue
|
|
158
|
-
|
|
159
|
-
在进行重大修改之前,请先开一个 issue 讨论方案。这可以避免重复劳动,并确保你的贡献与项目方向一致。
|
|
160
|
-
|
|
161
|
-
报告 Bug 时请包含:
|
|
162
|
-
|
|
163
|
-
1. OpenCodeReview 版本(`ocr version`)
|
|
164
|
-
2. 操作系统和架构
|
|
165
|
-
3. 复现步骤
|
|
166
|
-
4. 预期行为与实际行为
|
|
167
|
-
5. 相关日志或错误信息
|
|
168
|
-
|
|
169
|
-
### Pull Request 流程
|
|
170
|
-
|
|
171
|
-
1. **保持 PR 聚焦** — 每个 PR 只包含一个逻辑变更。多个独立改动请分别提交 PR。
|
|
172
|
-
2. **编写测试** — 为行为变更添加或更新测试。
|
|
173
|
-
3. **更新文档** — 如果变更影响用户侧行为,请同步更新相关文档。
|
|
174
|
-
4. **签署 CLA** — 所有贡献者需在 PR 合并前签署贡献者许可协议(详见下方)。
|
|
175
|
-
5. **填写 PR 模板** — 描述你的改动是什么以及为什么这样做。
|
|
176
|
-
|
|
177
|
-
### PR 标题格式
|
|
178
|
-
|
|
179
|
-
使用与 commit message 相同的 Conventional Commits 格式:
|
|
180
|
-
|
|
181
|
-
```
|
|
182
|
-
feat(agent): add support for custom tool definitions
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### 审查流程
|
|
186
|
-
|
|
187
|
-
- 维护者通常会在几个工作日内审查你的 PR。
|
|
188
|
-
- 我们可能会要求修改——这很正常,是协作而非对立。
|
|
189
|
-
- 一旦批准,维护者会合并你的 PR。
|
|
190
|
-
|
|
191
|
-
## 贡献者许可协议(CLA)
|
|
192
|
-
|
|
193
|
-
我们要求所有贡献者在合并代码前签署阿里巴巴开源贡献者许可协议(CLA)。这确保项目可以在其许可条款下合法分发。
|
|
194
|
-
|
|
195
|
-
当你首次提交 PR 时,CLA bot 会自动发布评论并附上签署说明。只需点击链接进行电子签署即可,整个过程只需一分钟。
|
|
196
|
-
|
|
197
|
-
## 新手推荐
|
|
198
|
-
|
|
199
|
-
第一次参与?可以关注以下标签的 issue:
|
|
200
|
-
|
|
201
|
-
- [`good first issue`](https://github.com/alibaba/open-code-review/labels/good%20first%20issue) — 小型、范围明确的任务,适合快速上手。
|
|
202
|
-
- [`help wanted`](https://github.com/alibaba/open-code-review/labels/help%20wanted) — 我们希望得到社区帮助的问题。
|
|
203
|
-
|
|
204
|
-
适合入手的方向:
|
|
205
|
-
|
|
206
|
-
- 改善错误信息和 CLI 输出
|
|
207
|
-
- 为未覆盖的代码路径编写测试
|
|
208
|
-
- 文档改进
|
|
209
|
-
|
|
210
|
-
## 社区
|
|
211
|
-
|
|
212
|
-
- **Bug 报告** — [GitHub Issues](https://github.com/alibaba/open-code-review/issues)
|
|
213
|
-
- **功能建议** — [GitHub Discussions (Ideas)](https://github.com/alibaba/open-code-review/discussions/categories/ideas) 或 [Feature Request Issue](https://github.com/alibaba/open-code-review/issues/new?template=feature_request.yml)
|
|
214
|
-
- **使用疑问与帮助** — 对 OpenCodeReview 的使用有任何疑问,欢迎在 [GitHub Discussions](https://github.com/alibaba/open-code-review/discussions) 中提问交流
|
|
215
|
-
|
|
216
|
-
## 许可证
|
|
217
|
-
|
|
218
|
-
向 OpenCodeReview 贡献代码即表示你同意你的贡献将以 [Apache License 2.0](LICENSE) 进行许可。
|
package/examples/README.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# CI/CD Integration Examples
|
|
2
|
-
|
|
3
|
-
This directory contains examples for integrating OpenCodeReview (OCR) into various CI/CD pipelines.
|
|
4
|
-
|
|
5
|
-
## Contents
|
|
6
|
-
|
|
7
|
-
- **[github_actions/](./github_actions/)** - GitHub Actions integration example
|
|
8
|
-
- **[gitlab_ci/](./gitlab_ci/)** - GitLab CI integration example
|
|
9
|
-
|
|
10
|
-
Each subdirectory contains its own README with detailed setup instructions.
|