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:
Lei Zhang 2026-06-04 23:57:05 +08:00 committed by GitHub
parent e48b132ebf
commit 55c6bca1f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 16 deletions

View file

@ -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