Skip to content

fix: add leading slash to API URI paths#81

Open
TineoC wants to merge 1 commit into
danobi:masterfrom
TineoC:master
Open

fix: add leading slash to API URI paths#81
TineoC wants to merge 1 commit into
danobi:masterfrom
TineoC:master

Conversation

@TineoC

@TineoC TineoC commented Jul 14, 2026

Copy link
Copy Markdown

Summary

Fixes prr submit failing with Error: Invalid URI / path does not start with slash.

Problem

http::Uri::builder().path_and_query() requires the path component to start with / per RFC 3986. Both submit_review() and submit_file_comment() in src/prr.rs constructed paths like repos/owner/repo/pulls/123/reviews without the leading slash, causing every submit attempt to fail.

Fix

Added a leading / to the format strings in both locations in src/prr.rs.

Fixes #80

Testing

Verified by piping the JSON output of prr submit --debug 2>/dev/null into gh api --input - which successfully submitted a review with 13 inline comments to a real PR.

Uri::builder().path_and_query() requires the path to start with '/'
per RFC 3986. Both submit_review() and submit_file_comment() in
src/prr.rs constructed paths like 'repos/owner/repo/pulls/123/reviews'
without the leading slash, causing 'Invalid URI: path does not start
with slash' on every submit attempt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: prr submit fails with 'path does not start with slash'

1 participant