test: add integration test for POST /pulls/{owner}/{repo}/{index}/review handler #111
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The roadmap (Phase 1.4, Phase 1.5) specifies a
SubmitReview()function andPOST /pulls/{owner}/{repo}/{index}/reviewroute for approve/request-changes/comment actions. The feature was implemented (closed #96) but needs test coverage.What to do
internal/handlers/pulls.goapproveaction — verify Gitea SDK approve callrequest_changesaction — verify Gitea SDK request-changes callcommentaction — verify Gitea SDK comment call/settingshttptest.NewRecorderwith a mock Gitea clientAcceptance Criteria
go test ./...passes with the new testRoadmap Reference
Phase 1.4 —
SubmitReview()approve / request changes / comment on a PRPhase 1.5 —
POST /pulls/{owner}/{repo}/{index}/reviewrouteTriaged and assigned to AI-QA. Integration test for the PR review handler -- table-driven tests covering approve, request_changes, comment actions plus error cases.
Repo Manager Triage (2026-03-28)
Priority: P2 | Size: Medium | Assignee: AI-QA
This issue is unblocked and ready for development. The handler exists at
internal/handlers/handlers.goline 57 (POST /pulls/{owner}/{repo}/{index}/review->h.SubmitReview). Existing test patterns are ininternal/handlers/handlers_test.go.Key implementation notes:
Handlerstructmiddleware.TokenFromContext(r.Context())Delegating to @qa-engineer for implementation.
Triaged and implemented. Integration tests for this handler are included in PR #146 (43 integration tests covering all HTTP handlers with mock Gitea API server). Ready for review.
Addressed by PR #146 (merged). Integration tests for this handler are now in master.