Follow-up to 5d3db5d (#571). No user-visible CLI changes.
- Replace tautological metadata unit tests with httptest-based e2e
tests that exercise runRequestReview, runCancelReview, and
runReviewersList against a mock Gitea API; each test captures
method, path, and request body.
- Add tests/integration/pulls_reviewers_test.go covering create-time
--reviewer/--team-reviewer, request-review add, cancel-review by
user and by team, validation error, and bad-PR error against a
real Gitea instance.
- Extract parseReviewRequestArgs in cmd/pulls/review_helpers.go so
runRequestReview and runCancelReview share one validation/parsing
path; both now route through task.ApplyReviewerChanges instead of
inlining the SDK call.
- Extend task.ApplyReviewerChanges to accept teamAdd/teamRm and use
it from request-review, cancel-review, and the existing edit flow.
- Replace task.CreatePull 8-positional-arg signature with a
CreatePullOptions struct; update cmd/pulls/create.go and
modules/interact/pull_create.go call sites.
- Defensively filter empty CSV entries in parseReviewRequestArgs via
nonEmptyValues so the validation is correct regardless of whether
the underlying CsvFlag trims empty entries (kept independent of
the separate CsvFlag bugfix PR).
Verification:
make fmt fmt-check vet lint test docs docs-check build