prr icon indicating copy to clipboard operation
prr copied to clipboard

feat: `prr get` only changes since last review

Open bcspragu opened this issue 3 years ago • 1 comments

For large/multi-round reviews, it'd be great to be able to get an arbitrary subset of the diff, mainly "changes since last review", like presented in the GitHub UI:

image of GitHub review UI, showing "Changes since your last review" and other options

I'm not sure if GitHub exposes that in the API or it'd have to be tracked manually on the first prr submit, but it'd be great to be able to do something like prr get <PR> --changes-since-last-review or something (probably less verbose).

If this is something others would find useful, I'd be happy to take a crack at it (pointers greatly appreciated)

bcspragu avatar Oct 27 '22 20:10 bcspragu

Yeah that does sound rather useful. Looking at how we store commit_id ( https://github.com/danobi/prr/blob/6219a6cbe656fa34e9d288f7a5a622d977e6e85b/src/review.rs#L33-L34 ) may be a good place to start.

As for getting the changes since last review, may or may not be tricky. I don't see anything obvious in octocrab API so you may need to make REST requests manually.

danobi avatar Nov 01 '22 00:11 danobi