Skip to content

Adjust code review to include incremental changes#22

Merged
tnederlof merged 8 commits into
mainfrom
oz-agent/review-sha-context
Jun 1, 2026
Merged

Adjust code review to include incremental changes#22
tnederlof merged 8 commits into
mainfrom
oz-agent/review-sha-context

Conversation

@tnederlof
Copy link
Copy Markdown
Contributor

  • 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.

@tnederlof tnederlof requested a review from vkodithala May 21, 2026 16:41
Copy link
Copy Markdown

@vkodithala vkodithala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@tnederlof
Copy link
Copy Markdown
Contributor Author

Yes, that sounds right @vkodithala, how can we set up this example action so it's easy for folks to request a rereview?

@tnederlof
Copy link
Copy Markdown
Contributor Author

@vkodithala I took a stab at this direction, incorporating /oz-review as a trigger to do the re-review. I think it's common enough to include something like this right into our code review examples (versus only on the ready for review issue first time), but defer to you all on the best way to implement.

Co-Authored-By: Oz <oz-agent@warp.dev>
Comment thread examples/review-pr.yml Outdated
@vkodithala vkodithala self-requested a review May 28, 2026 11:34
Copy link
Copy Markdown

@vkodithala vkodithala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread examples/review-pr.yml Outdated

// Post the main review with text-file inline comments.
if (hasSummary || comments.length > 0) {
if (hasSummary || comments.length > 0 || fileComments.length > 0) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread examples/review-pr.yml Outdated
Comment thread README.md Outdated
_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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll want to include context here that we also re-run PR review on comments that include "/oz-review".

@tnederlof
Copy link
Copy Markdown
Contributor Author

So far it looks good, here is a test interaction I had on the Saleor repo: https://github.com/warpdotdev-demos/saleor/pull/83

@tnederlof tnederlof requested a review from vkodithala June 1, 2026 16:21
Copy link
Copy Markdown

@vkodithala vkodithala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks so much for making these changes @tnederlof. Assuming you've tested this out, I'll cool with this going in!

@tnederlof tnederlof merged commit 519cbed into main Jun 1, 2026
8 checks passed
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.

3 participants