fix(#827): dismiss stale bot approvals - #7075
Conversation
E2E tests did not runE2E tests run automatically for org/repo members and collaborators on pull requests. For other contributors, a maintainer must add the See E2E testing guide for details. |
PR Summary by QodoDismiss stale bot approvals before new review verdicts
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 1:12 PM UTC · Completed 1:27 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.68 |
|
Risk Assessment: moderate (2/5) DetailsA small, well-tested two-file change fixing a focused bug, but the touched files carry elevated risk signals from high multi-author contention and a heavy fix/revert history over the past 90 days. |
ReviewFindingsLow
Next steps:
|
Dismiss prior APPROVED reviews before processing a new bot verdict so GitHub does not retain approval for an older commit. Add regression coverage for comment-only verdicts, user filtering, and dismissal errors. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Shai Revivo <srevivo@redhat.com>
Dismiss stale approvals only after a replacement formal review succeeds. Comment-only verdicts still dismiss stale approvals because they have no replacement formal review. Add regression coverage for direct and fallback review submission failures. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Shai Revivo <srevivo@redhat.com>
Keep only priorReviews in the outer scope; let user be declared at the authenticated-user lookup. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Shai Revivo <srevivo@redhat.com>
a85f597 to
cf9b017
Compare
Summary
Dismiss stale approvals from the review bot before processing a new verdict,
so GitHub does not retain approval for an older commit.
Related Issue
Fixes #827
Changes
APPROVEDreviews belonging to the authenticated botCHANGES_REQUESTEDcleanupTesting
make lintmake go-vetgo test ./internal/clidismissStaleApprovals: 100%)Checklist