feat: give context on previous reviews for successive review requests #263

Open
ci-bot wants to merge 1 commit from feat/successive-review-context into main
Member

Closes #165

When the agent is assigned as a reviewer again on a pull request it has already reviewed, it now gets the full history of its previous reviews in the prompt:

  • Previous reviews — author, verdict (state), reviewed commit, and summary body.
  • Inline review comments — path, line, author, and body for each comment.

The prompt also instructs the agent to check the current code against each previously raised issue: acknowledge the ones that are fixed, re-raise the ones still open, and look for new issues introduced since the last review.

Changes

  • src/schemas.ts — extended prReviewSchema and prReviewCommentSchema with author, verdict, commit, timestamps, path and line; added prReviewWithCommentsSchema.
  • src/forgejo/index.ts — added getPrReviewsWithComments() which fetches all PR reviews together with their inline comments.
  • src/context.ts — fetches previous reviews (with comments) on pull_request_review_requested events and exposes them in the event context.
  • src/prompt.ts — renders the previous reviews section and adds successive-review guidance when previous reviews exist.
Closes #165 When the agent is assigned as a reviewer again on a pull request it has already reviewed, it now gets the full history of its previous reviews in the prompt: - **Previous reviews** — author, verdict (`state`), reviewed commit, and summary body. - **Inline review comments** — path, line, author, and body for each comment. The prompt also instructs the agent to check the current code against each previously raised issue: acknowledge the ones that are fixed, re-raise the ones still open, and look for new issues introduced since the last review. ## Changes - `src/schemas.ts` — extended `prReviewSchema` and `prReviewCommentSchema` with author, verdict, commit, timestamps, path and line; added `prReviewWithCommentsSchema`. - `src/forgejo/index.ts` — added `getPrReviewsWithComments()` which fetches all PR reviews together with their inline comments. - `src/context.ts` — fetches previous reviews (with comments) on `pull_request_review_requested` events and exposes them in the event context. - `src/prompt.ts` — renders the previous reviews section and adds successive-review guidance when previous reviews exist.
feat: give context on previous reviews for successive review requests
All checks were successful
check-commitizen.yaml / Check the PR title (pull_request) Successful in 2s
check-formatter.yaml / Checks with formatters (pull_request) Successful in 9s
check-linter.yaml / Checks with linters (pull_request) Successful in 9s
check-prettier.yaml / Check files formatting (pull_request) Successful in 3s
check-yamllint.yaml / Lint yaml files (pull_request) Successful in 3s
check-syntax.yaml / Checks with static tools (pull_request) Successful in 8s
forgejo-agent / LLM Bot response generation (pull_request) Successful in 2s
b2071e632b
All checks were successful
check-commitizen.yaml / Check the PR title (pull_request) Successful in 2s
check-formatter.yaml / Checks with formatters (pull_request) Successful in 9s
Required
Details
check-linter.yaml / Checks with linters (pull_request) Successful in 9s
Required
Details
check-prettier.yaml / Check files formatting (pull_request) Successful in 3s
Required
Details
check-yamllint.yaml / Lint yaml files (pull_request) Successful in 3s
Required
Details
check-syntax.yaml / Checks with static tools (pull_request) Successful in 8s
Required
Details
forgejo-agent / LLM Bot response generation (pull_request) Successful in 2s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/successive-review-context:feat/successive-review-context
git switch feat/successive-review-context
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
projects/forgejo-agent!263
No description provided.