Adjust code review to include incremental changes#22
Conversation
tnederlof
commented
May 21, 2026
- Extend the review workflow to run on PR synchronize events in addition to initial review triggers.
- Preserve the existing full-PR review behavior, while generating an incremental diff for follow-up reviews so the agent can focus on newly pushed changes (but still have access to the full diff for context).
- Pass PR action/SHA context into the review prompt
- Update the review skill guidance to prioritize incremental changes when available, using the full PR diff for broader context and valid inline comment placement.
- Regenerate the reusable workflow and consumer template so the example and shipped workflow stay aligned.
Co-Authored-By: Oz <oz-agent@warp.dev>
vkodithala
left a comment
There was a problem hiding this comment.
Is the implication here that we're gonna re-run a review whenever a contributor makes new commit? If so, this is probably lossy, since folks often make commits with in-flight changes - the true signal for what should be reviewed is probably a re-requested review.
I think what we probably want to do here is still only trigger the review-pr workflow for opened PRs and those with requested re-reviews, but include richer information about what's changed and/or previous reviews. Wdyt?
|
Yes, that sounds right @vkodithala, how can we set up this example action so it's easy for folks to request a rereview? |
|
@vkodithala I took a stab at this direction, incorporating |
Co-Authored-By: Oz <oz-agent@warp.dev>
vkodithala
left a comment
There was a problem hiding this comment.
Thanks for the fixes!
Few nits, these changes mostly LGTM. If you have cycles, mind dropping review-pr into .github/workflows for a sample repo i.e. saleor and dogfooding that these changes work on re-review?
|
|
||
| // Post the main review with text-file inline comments. | ||
| if (hasSummary || comments.length > 0) { | ||
| if (hasSummary || comments.length > 0 || fileComments.length > 0) { |
There was a problem hiding this comment.
nit: Is there a reason we added fileComments.length > 0 here? Not important, but I don't actually think we need this conditional at all - the early return at :365-368 seems to handle.
Can probably just remove, but unimportant and defer to you.
| _Consumer Template_: [consumer-workflows/review-pr.yml](consumer-workflows/review-pr.yml) | ||
|
|
||
| **Usage:** Runs automatically when a Pull Request is opened or marked ready for review. | ||
| **Usage:** Runs automatically when a draft Pull Request is marked ready for review. |
There was a problem hiding this comment.
I think we'll want to include context here that we also re-run PR review on comments that include "/oz-review".
|
So far it looks good, here is a test interaction I had on the Saleor repo: https://github.com/warpdotdev-demos/saleor/pull/83 |
vkodithala
left a comment
There was a problem hiding this comment.
This looks great, thanks so much for making these changes @tnederlof. Assuming you've tested this out, I'll cool with this going in!