mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-09 17:28:58 +00:00
chore: update ci pipeline examples (#45)
* chore: remove --audience agent flag and simplify JSON parsing in CI examples - Remove --audience agent flag from ocr review commands in CI examples - Simplify JSON output parsing by reading directly without skipping first line - Update README docs to reflect the simplified CLI usage * fix: correct typo in .gitlab-ci.yml comment Change 'confuring' to 'setting' in CI variable configuration comment.
This commit is contained in:
parent
e48b132ebf
commit
55c6bca1f8
5 changed files with 9 additions and 16 deletions
|
|
@ -95,7 +95,6 @@ jobs:
|
|||
--from "origin/${BASE_REF}" \
|
||||
--to "origin/${HEAD_REF}" \
|
||||
--format json \
|
||||
--audience agent \
|
||||
> /tmp/ocr-result.json 2>/tmp/ocr-stderr.log || true
|
||||
|
||||
echo "OCR review completed. Output:"
|
||||
|
|
@ -111,12 +110,11 @@ jobs:
|
|||
const fs = require('fs');
|
||||
const path = '/tmp/ocr-result.json';
|
||||
|
||||
// Read OCR output (skip first line which is not valid JSON)
|
||||
// Read OCR output
|
||||
let result;
|
||||
try {
|
||||
const raw = fs.readFileSync(path, 'utf8');
|
||||
const jsonContent = raw.substring(raw.indexOf('\n') + 1);
|
||||
result = JSON.parse(jsonContent);
|
||||
result = JSON.parse(raw);
|
||||
} catch (e) {
|
||||
console.log('Failed to parse OCR output:', e.message);
|
||||
// Post a simple comment if parsing fails
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue