Consistent url.PathEscape across all Gitea client endpoints #24
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?
Problem
Some endpoints (ListReviews, DeleteReview) use
url.PathEscapefor 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.goand applyurl.PathEscapeto owner/repo (and any other user-supplied path segments) consistently across every endpoint.Risk
Low — for typical
owner/reponames 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.