Skip to content

re-review

Terminal window
chernabog recipes add re-review

Bakes .chernabog/flows/re-review.ts, and .chernabog/prompts/review.md for a first review when it has none of its own to resume.

Picks up an open pull request that asks the persona to review it again after it already reviewed it, one run per request. It leaves alone a pull request labelled auto:needs-human, so asking again during a dispute doesn’t restart the loop; a person removes the label to hand it back.

Runs as a persona with a seat in the reviewer pool: a login under github: in machine config that the repo’s reviewers: list. Run as the implicit account, or as a login outside the pool, it starts nothing, and chernabog status shows NotInReviewerPool with the fix.

Ends with an approval, which merges an auto:ship pull request the way review does, or the pull request handed to a person with auto:needs-human.

  1. Review.latestOwnReview — the persona’s latest review of the pull request, from its marker. Without one to resume, such as a review posted before markers named their reviewer, it reviews afresh, as review does.
  2. reviewRounds caps the re-reviews of one pull request, 1 by default: past it, PullRequest.handToPerson hands the pull request to a person without reviewing.
  3. Review.recheck — resumes the session of its own review with the change since, and posts its review.
  4. Review.doneReviewing, then PullRequest.comment — lists which findings are remediated and which are still open.
  5. An approval merges on the automated path, as review does: a merge GitHub refuses because the pull request conflicts with its base is left for resolve-conflicts, and any other refusal goes to a person. Changes requested again hand the pull request to a person.

A repo that baked re-review before this keeps handing a conflicting approval to a person until it brings the change over: chernabog recipes diff re-review shows it.