@alibaba-group/open-code-review 1.1.17 → 1.1.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.md CHANGED
@@ -208,11 +208,10 @@ The core command for CI integration:
208
208
  ocr review \
209
209
  --from "origin/main" \
210
210
  --to "origin/feature-branch" \
211
- --format json \
212
- --audience agent
211
+ --format json
213
212
  ```
214
213
 
215
- The `--format json` and `--audience agent` flags output machine-readable results suitable for parsing in CI scripts.
214
+ The `--format json` flag outputs machine-readable results suitable for parsing in CI scripts.
216
215
 
217
216
  See the [`examples/`](./examples/) directory for integration examples:
218
217
 
package/README.zh-CN.md CHANGED
@@ -208,11 +208,10 @@ CI 集成的核心命令:
208
208
  ocr review \
209
209
  --from "origin/main" \
210
210
  --to "origin/feature-branch" \
211
- --format json \
212
- --audience agent
211
+ --format json
213
212
  ```
214
213
 
215
- `--format json` 和 `--audience agent` 参数输出适合 CI 脚本解析的机器可读结果。
214
+ `--format json` 参数输出适合 CI 脚本解析的机器可读结果。
216
215
 
217
216
  集成示例请参见 [`examples/`](./examples/) 目录:
218
217
 
@@ -95,7 +95,6 @@ jobs:
95
95
  --from "origin/${BASE_REF}" \
96
96
  --to "origin/${HEAD_REF}" \
97
97
  --format json \
98
- --audience agent \
99
98
  > /tmp/ocr-result.json 2>/tmp/ocr-stderr.log || true
100
99
 
101
100
  echo "OCR review completed. Output:"
@@ -111,12 +110,11 @@ jobs:
111
110
  const fs = require('fs');
112
111
  const path = '/tmp/ocr-result.json';
113
112
 
114
- // Read OCR output (skip first line which is not valid JSON)
113
+ // Read OCR output
115
114
  let result;
116
115
  try {
117
116
  const raw = fs.readFileSync(path, 'utf8');
118
- const jsonContent = raw.substring(raw.indexOf('\n') + 1);
119
- result = JSON.parse(jsonContent);
117
+ result = JSON.parse(raw);
120
118
  } catch (e) {
121
119
  console.log('Failed to parse OCR output:', e.message);
122
120
  // Post a simple comment if parsing fails
@@ -27,7 +27,7 @@ code-review:
27
27
 
28
28
  # Configure OCR
29
29
  - mkdir -p ~/.open-code-review
30
- # Gitlab CI/CD does not support confuring variables with value length less than 8, so you can't set use_anthropic as a CI variable
30
+ # Gitlab CI/CD does not support setting variables with value length less than 8, so you can't set use_anthropic as a CI variable
31
31
  - |
32
32
  ocr config set llm.url $OCR_LLM_URL
33
33
  ocr config set llm.auth_token $OCR_LLM_AUTH_TOKEN
@@ -42,7 +42,6 @@ code-review:
42
42
  --from "origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}" \
43
43
  --to "origin/${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}" \
44
44
  --format json \
45
- --audience agent \
46
45
  > /tmp/ocr-result.json 2>/tmp/ocr-stderr.log || true
47
46
  echo "OCR review completed."
48
47
  cat /tmp/ocr-result.json
@@ -139,10 +138,9 @@ code-review:
139
138
 
140
139
  # --- Main ---
141
140
 
142
- # Read OCR result (skip first line which is summary, not JSON)
141
+ # Read OCR result
143
142
  try:
144
143
  with open("/tmp/ocr-result.json", "r") as f:
145
- next(f) # Skip first line
146
144
  result = json.load(f)
147
145
  except (FileNotFoundError, json.JSONDecodeError) as e:
148
146
  print(f"Failed to parse OCR output: {e}", file=sys.stderr)
@@ -172,8 +172,7 @@ script:
172
172
  "ocr", "review",
173
173
  "--from", f"origin/{TARGET_BRANCH}",
174
174
  "--to", f"origin/{SOURCE_BRANCH}",
175
- "--format", "json",
176
- "--audience", "agent"
175
+ "--format", "json"
177
176
  ], capture_output=True, text=True)
178
177
 
179
178
  # Save output for the posting script
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alibaba-group/open-code-review",
3
- "version": "1.1.17",
3
+ "version": "1.1.19",
4
4
  "description": "OpenCodeReview CLI — AI-powered code review tool",
5
5
  "bin": {
6
6
  "ocr": "bin/ocr.js"