Skip to content

AI Code Review: MR gets reviewed multiple times for the same commit #746

Open
@echarrod

Description

@echarrod

Describe the bug

MR gets reviewed multiple times for the same commit, and comments multiple times.

To Reproduce

  1. Self-hosted GitLab instance, running with config:
# -*- mode: yaml -*-
manifest:
  version: 1.0

automations:

  linearb_ai_description:
    if:
      - {{ not pr.draft }}
      - {{ not is.bot }}
    run:
      - action: describe-changes@v1
        args:
          concat_mode: append

  linearb_ai_review:
    if:
      - {{ not pr.draft }}
      - {{ not is.bot }}
    run:
      - action: code-review@v1
        args:
          guidelines: {{ guidelines }}

# Define variables
# Add conditions for PR approvals. For example - allow approval only for specific users
is:
  bot: {{ pr.author | match(list=['@project_35771297_bot_558e119f0f4d33f2fc8b315e66d53c86', '@group_14117954_bot_085a90599cd4653c9aa736ce6538ae23', '@project_35771297_bot_3baa505335b81595ea1f502563700a41']) | some }}

# Add `guidelines` to add your prompts to the review, you can have org wide instructions
# by placing the `REVIEW_RULES.md` in the `cm` repo or team level instructions by adding it to
# the team repo.
# Note: To when the file is in the `cm` repo, use this example: `../cm/REVIEW_RULES.md`
guidelines: {{ "./.cm/REVIEW_RULES.md" | readFile() | dump }}

Expected behavior

One comment per commit/push, with older comments being deleted

Screenshots

Image

Additional context

Running on self-hosted GitLab instance, using image index.docker.io/gitstream/rules-engine:1.0.130

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working👀.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions