mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
A pr-reviewer review of an org-authored PR never reached GitHub. The agent side ran correctly (claim → read-only diff → review → post_pr_review → completed + CEO notify), but the GitHub publish 422'd with "Can not request changes on your own pull request": the PR was authored by the same account that owns the project PAT. post_pr_review posts best-effort after the DB transition, so the failure was logged and swallowed — the task completed and the CEO was notified "reviewed" while the PR showed no review. GitHub forbids APPROVE / REQUEST_CHANGES on your own PR but DOES allow a plain COMMENT review. The org's internal PRs (and any PR the PAT owner opened) hit this. Retry once as a COMMENT review on the self-review 422 so the review actually lands; the verdict is already stated in the body. The external/fork-PR path (different author) is unchanged — REQUEST_CHANGES succeeds there and the fallback never fires. Tests: self-review 422 downgrades to COMMENT and returns the COMMENT result; a failing COMMENT retry still surfaces GitError with no infinite loop; the existing non-self 422 still raises.