Skip to content

[BUG] GitLab MR label/title edits and approvals re-run code review without new commits #95

Closed

Description

@OkiriGabriel

Problem

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 update with object_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

  1. added
    bug
    integration
    on Oct 19, 2026
  2. added a commit that references this issue on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugintegration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions