Consistent url.PathEscape across all Gitea client endpoints #24

Closed
opened 2026-05-02 04:02:36 +00:00 by rodin · 0 comments
Owner

Problem

Some endpoints (ListReviews, DeleteReview) use url.PathEscape for owner/repo path segments while others (GetPullRequest, GetPullRequestDiff, PostReview) interpolate raw values directly.

This inconsistency has been flagged in 3 separate reviews now.

Fix

Audit all methods in gitea/client.go and apply url.PathEscape to owner/repo (and any other user-supplied path segments) consistently across every endpoint.

Risk

Low — for typical owner/repo names this is a no-op. Only matters for names with special characters (spaces, slashes, unicode). But consistency eliminates an entire class of potential bugs.

Context

Flagged as [NIT] or [MINOR] in PRs #17, #20, and #22 by multiple reviewers.

## Problem Some endpoints (ListReviews, DeleteReview) use `url.PathEscape` for owner/repo path segments while others (GetPullRequest, GetPullRequestDiff, PostReview) interpolate raw values directly. This inconsistency has been flagged in 3 separate reviews now. ## Fix Audit all methods in `gitea/client.go` and apply `url.PathEscape` to owner/repo (and any other user-supplied path segments) consistently across every endpoint. ## Risk Low — for typical `owner/repo` names this is a no-op. Only matters for names with special characters (spaces, slashes, unicode). But consistency eliminates an entire class of potential bugs. ## Context Flagged as [NIT] or [MINOR] in PRs #17, #20, and #22 by multiple reviewers.
rodin closed this issue 2026-05-02 14:01:53 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rodin/review-bot#24