Pre-Submission vs. Formal Merge/Pull Request Code Reviews

Posted by crmpicco@reddit | ExperiencedDevs | View on Reddit | 6 comments

I've recently been exploring ways to integrate AI-assisted code reviews into my GitLab workflow. I've found PR Agent to be a promising tool. It integrates nicely with .gitlab-ci.yml and can be triggered conditionally for merge requests, providing a lightweight and immediate review. So far, I'm really impressed with its potential! 👍

My current strategic question is about the timing and scope of code reviews. While PR Agent offers great in-GitLab automated reviews, I'm wondering about the practice of performing a pre-submission review on a developer's local environment before the formal merge request is even created.

My dilemma is this:

  1. Is it a good idea to have an automated, local pre-submission review AND then a formal, in-GitLab review (whether automated or human)? Or is this process redundant?
  2. My primary concern with relying solely on local pre-submission reviews is the lack of an auditable record. If all the initial review happens exclusively on a developer's machine, there's no easily accessible history of that review process within GitLab for future reference, compliance, or knowledge sharing.

I'm curious to hear from others on how you approach this. What are your team's best practices for balancing local checks with formal, documented code reviews in GitLab? Any insights or patterns you've adopted would be greatly appreciated!