fix(review): language-tagged suggestion fence for Gitea syntax highlighting
Gitea 1.26.x has no GitHub-style 'Apply suggestion' button — a ```suggestion fence is just an unknown-language code block, so chroma does not highlight it and there is no apply control. Switch inline_comment_body to wrap the suggested fix in a fence tagged with the file's language (new _lang_for_path helper, .java→java, .ts→typescript, .py→python, ...), so Gitea syntax-highlights the code. No capability lost (there was never an apply button on this Gitea version). Correct the docstrings/skills/README that wrongly claimed an apply-button was rendered. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -37,13 +37,14 @@ ai_review.review_pr() (same core the CI-step uses)
|
||||
7. post review → POST .../pulls/{i}/reviews (event: COMMENT) as pragent-bot
|
||||
- prose summary → review body intro
|
||||
- anchored findings → inline line comments, body wraps `suggestion` in a
|
||||
```suggestion fence (Gitea renders an apply-button); reference → 📎 ref link
|
||||
language-tagged fenced code block (Gitea syntax-highlights it; Gitea
|
||||
1.26.x has no apply-suggestion button); reference → 📎 ref link
|
||||
- unanchored findings → summary-body bullets
|
||||
- summary body carries the <!-- pragent:sha=... --> marker for dedupe
|
||||
```
|
||||
|
||||
Fail-open. No duplicate per commit (dedupe). Inline comments + apply-able
|
||||
suggestions where the line anchors cleanly. Repo-local focus via
|
||||
Fail-open. No duplicate per commit (dedupe). Inline comments + syntax-highlighted
|
||||
suggested-fix blocks where the line anchors cleanly. Repo-local focus via
|
||||
`.pr-review.json`. Prior reviews fed as context so re-pushes synthesize instead
|
||||
of repeating (light version of framework §6.1).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user