Description
prr submit fails with Error: Invalid URI / path does not start with slash on every submission attempt. The error comes from http::Uri::builder().path_and_query() which requires the path component to start with / per RFC 3986.
Root cause
In src/prr.rs, both submit_review() and submit_file_comment() construct API paths without a leading slash:
- Line 391:
format!("repos/{}/{}/pulls/{}/reviews", ...)
- Line 441:
format!("repos/{}/{}/pulls/{}/comments", ...)
These produce paths like repos/owner/repo/pulls/123/reviews which lack the required / prefix.
Fix
Add a leading / to both format strings:
- format!("repos/{}/{}/pulls/{}/reviews", owner, repo, pr_num)
+ format!("/repos/{}/{}/pulls/{}/reviews", owner, repo, pr_num)
- format!("repos/{}/{}/pulls/{}/comments", owner, repo, pr_num)
+ format!("/repos/{}/{}/pulls/{}/comments", owner, repo, pr_num)
Workaround
Pipe the JSON from prr submit --debug 2>/dev/null into gh api --method POST repos/.../pulls/.../reviews --input - to bypass prr broken HTTP client.
Description
prr submitfails withError: Invalid URI/path does not start with slashon every submission attempt. The error comes fromhttp::Uri::builder().path_and_query()which requires the path component to start with/per RFC 3986.Root cause
In
src/prr.rs, bothsubmit_review()andsubmit_file_comment()construct API paths without a leading slash:format!("repos/{}/{}/pulls/{}/reviews", ...)format!("repos/{}/{}/pulls/{}/comments", ...)These produce paths like
repos/owner/repo/pulls/123/reviewswhich lack the required/prefix.Fix
Add a leading
/to both format strings:Workaround
Pipe the JSON from
prr submit --debug 2>/dev/nullintogh api --method POST repos/.../pulls/.../reviews --input -to bypassprrbroken HTTP client.