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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.