You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] GitLab MR label/title edits and approvals re-run code review without new commits #95
In api/server.py#L468, GitLab merge-request events queue a code review when action is open, reopen, update or approved, or whenever state == "opened".
GitLab sends action: update for title, description, label, assignee and milestone edits, not only new commits. Each of those edits queues a full review again.
approved re-reviews unchanged code.
The or attrs.get("state") == "opened" fallback means almost any event on an open MR (for example unapproved or unlabeled) queues a review.
Combined with CODE_REVIEW_AUTO_POST=true, this produces duplicate review comments and wastes LLM spend.
Suggested fix
Queue only for open, reopen, or updatewithobject_attributes.oldrev present (GitLab sets it only when new commits are pushed).
Drop approved and the state == "opened" fallback.
Dedupe on (project, iid, last_commit.id).
Add tests for a label-only update (ignored) and a push update (queued).
Activity
Merge pull request #104 from Nitjsefnie-OSC/fix/review-trigger-events