Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prr get only changes since last review #19

Open
bcspragu opened this issue Oct 27, 2022 · 1 comment
Open

feat: prr get only changes since last review #19

bcspragu opened this issue Oct 27, 2022 · 1 comment

Comments

@bcspragu
Copy link
Contributor

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)

@danobi
Copy link
Owner

danobi commented Nov 1, 2022

Yeah that does sound rather useful. Looking at how we store commit_id (

prr/src/review.rs

Lines 33 to 34 in 6219a6c

/// The commit hash of the PR at the time the review was started
commit_id: Option<String>,
) 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.

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

No branches or pull requests

2 participants