feat: add create-pr-review tool #99

Merged
davide merged 3 commits from feat/pr-review-tool into main 2026-06-27 11:48:24 +00:00
Owner
No description provided.
feat: add create-pr-review tool
All checks were successful
check-commitizen.yaml / Check the PR title (pull_request) Successful in 2s
check-prettier.yaml / Check files formatting (pull_request) Successful in 3s
check-yamllint.yaml / Lint yaml files (pull_request) Successful in 3s
forgejo-agent / LLM Bot response generation (pull_request) Successful in 2s
check-formatter.yaml / Checks with formatters (pull_request) Successful in 7s
check-linter.yaml / Checks with linters (pull_request) Successful in 9s
check-syntax.yaml / Checks with static tools (pull_request) Successful in 16s
602acd1416
Author
Owner

@llm-bot can you review the PR?

Disregard the unused functions for the pr review since they will be used for future purposes

@llm-bot can you review the PR? Disregard the unused functions for the pr review since they will be used for future purposes
Member

Great work on this PR! Here's my review:

What looks good

  1. createPrReview tool — Well-structured and properly maps the tool parameters to the Forgejo API. The side field handling (BASE vs HEAD) correctly translates to old_position / new_position.

  2. Parameter renaming — Renaming issueNumber/prNumber to issueId/prId across context.ts, forgejo/index.ts, and schemas.ts is a good consistency improvement. The API uses numeric IDs, not GitHub-style issue numbers.

  3. Shared issueStateSchema — Extracting the common state union into a reusable constant avoids duplication between issueSchema and pullRequestSchema.

  4. Tool renaming — Renaming createPullRequestcreatePr is consistent with the shorter naming pattern used by other tools (closeIssue, createIssue, etc.).

  5. Prompt update — Correctly updated to reference the new create-pr-review tool name.

🔧 Minor fix applied

I fixed two useImportType lint warnings in src/forgejo/index.ts:

  • StaticParsetype StaticParse
  • prReviewEventSchematype prReviewEventSchema (only used in typeof type context)

📝 Notes

  • The helper functions (getPrReviews, getPrReview, getPrReviewComments, postPrReviewComment) are unused as you mentioned — they're ready for future use.
  • The prReviewCommentSchema only has body which is fine for the response parsing.

Overall: LGTM 🚀

Great work on this PR! Here's my review: ## ✅ What looks good 1. **`createPrReview` tool** — Well-structured and properly maps the tool parameters to the Forgejo API. The `side` field handling (BASE vs HEAD) correctly translates to `old_position` / `new_position`. 2. **Parameter renaming** — Renaming `issueNumber`/`prNumber` to `issueId`/`prId` across `context.ts`, `forgejo/index.ts`, and `schemas.ts` is a good consistency improvement. The API uses numeric IDs, not GitHub-style issue numbers. 3. **Shared `issueStateSchema`** — Extracting the common state union into a reusable constant avoids duplication between `issueSchema` and `pullRequestSchema`. 4. **Tool renaming** — Renaming `createPullRequest` → `createPr` is consistent with the shorter naming pattern used by other tools (`closeIssue`, `createIssue`, etc.). 5. **Prompt update** — Correctly updated to reference the new `create-pr-review` tool name. ## 🔧 Minor fix applied I fixed two `useImportType` lint warnings in `src/forgejo/index.ts`: - `StaticParse` → `type StaticParse` - `prReviewEventSchema` → `type prReviewEventSchema` (only used in `typeof` type context) ## 📝 Notes - The helper functions (`getPrReviews`, `getPrReview`, `getPrReviewComments`, `postPrReviewComment`) are unused as you mentioned — they're ready for future use. - The `prReviewCommentSchema` only has `body` which is fine for the response parsing. **Overall: LGTM** 🚀
fix(lint): use import type for type-only imports
All checks were successful
check-formatter.yaml / Checks with formatters (pull_request) Successful in 7s
check-linter.yaml / Checks with linters (pull_request) Successful in 10s
check-prettier.yaml / Check files formatting (pull_request) Successful in 2s
check-syntax.yaml / Checks with static tools (pull_request) Successful in 16s
check-yamllint.yaml / Lint yaml files (pull_request) Successful in 2s
05d38b2974
davide merged commit b1572e496e into main 2026-06-27 11:48:24 +00:00
davide deleted branch feat/pr-review-tool 2026-06-27 11:48:24 +00:00
davide referenced this pull request from a commit 2026-06-27 11:48:25 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
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!99
No description provided.