fix: add leading slash to API URI paths - #81
Open
TineoC wants to merge 6 commits into
Open
Conversation
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.
Fork behavior change: on submit, keep only the fenced ```suggestion blocks of each inline comment. Review-level summary comments, file-level comments, and prose surrounding a suggestion block are dropped. Also adds a Justfile for build/test/lint and a Homebrew formula that installs the binary as prr-suggest so it coexists with upstream prr. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Replaces rust.yml with ci.yml, which installs just and calls the same recipes used locally (just ci / just static). Drops the upstream docs deploy workflow, which has nothing to publish from this fork. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
prr submitfailing withError: 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. Bothsubmit_review()andsubmit_file_comment()insrc/prr.rsconstructed paths likerepos/owner/repo/pulls/123/reviewswithout the leading slash, causing every submit attempt to fail.Fix
Added a leading
/to the format strings in both locations insrc/prr.rs.Fixes #80
Testing
Verified by piping the JSON output of
prr submit --debug 2>/dev/nullintogh api --input -which successfully submitted a review with 13 inline comments to a real PR.