Problem
When triggered by PR events, the agent should review the PR diff and post meaningful review comments.
Expected behavior
- On
pull_request.opened or pull_request.synchronize, fetch the PR diff
- Pass the diff to the agent as context along with the repo's conventions
- Agent posts a PR review (not just a comment) with inline comments on specific lines
- Support approve/request-changes/comment review types
Implementation notes
- Use
octokit.pulls.get() with mediaType: { format: "diff" } to get the diff
- Use
octokit.pulls.createReview() to post structured reviews with line comments
- Include file context (not just the diff hunks) for better review quality
- Consider a
.openclaw.yml config for review preferences (style, strictness, focus areas)
- Rate limit: don't review every push, maybe only on request or first push
Priority
P1 — Key feature for the GitHub App use case, but depends on #1 (response posting) being done first.
Problem
When triggered by PR events, the agent should review the PR diff and post meaningful review comments.
Expected behavior
pull_request.openedorpull_request.synchronize, fetch the PR diffImplementation notes
octokit.pulls.get()withmediaType: { format: "diff" }to get the diffoctokit.pulls.createReview()to post structured reviews with line comments.openclaw.ymlconfig for review preferences (style, strictness, focus areas)Priority
P1 — Key feature for the GitHub App use case, but depends on #1 (response posting) being done first.