Update existing review instead of always posting a new one #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Every push triggers a new review, which creates a growing stack of review comments on the PR. On active PRs with many iterations, this clutters the conversation and makes it hard to find the current review state.
Proposed Solution
When posting a review, check if the same reviewer bot already has an existing review on the PR. If so, either:
Implementation Ideas
GET /repos/{owner}/{repo}/pulls/{pr}/reviewsand filter by the current reviewer usernamePOST /repos/{owner}/{repo}/pulls/{pr}/reviews/{id}/dismissalson the old one, then post newPATCH /repos/{owner}/{repo}/pulls/{pr}/reviews/{id}to update the body (if Gitea supports it)--update-existingflag (default: true) so users can opt into the old behavior with--update-existing=falseBenefits