1

So my question is that i want to set up a code review flow , the tools i have are : git,gitlab,jenkins.. my idea is like to have a kind of forms or checklists that a member of the team need to fill whenever other member want to merge some new code , if the checklist are filled correctly and the new code is approved by the reviewer then the code should be merge, else the merge request is refused.

does everyone have an idea how i can achieve this? or maybe have a better idea than having a checklist?

thank you all,

Best regards

  • something like this? https://gerrit-review.googlesource.com/q/status:open – Stefano Aug 29 '19 at 10:28
  • @Stefano, thank you for your response, no i didnt get exactely the idea of the site you shared with me, i want to checklist to be about the fact of reviewing the code itself, like " well documented? " check , "Code best practices " Check ... – Nawfal Nawfal Aug 29 '19 at 10:33

2 Answers2

0

You can use GitLab CI, is like Jenkins, and he can pass the test,compile and do the tasks what you want before the merge. In Gitlab you have automerge, that is completed when you configure. (https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)

Mrk992
  • 33
  • 5
0

With GitLab 13.7 (December 2020), you don't need a third-party tool like Gerrit.

You now have officially merge-request reviewers:

Reviewers for Merge Requests

Asking a colleague to review your code should be a routine part of contributing code, but it’s often needlessly complex.

A simple task like asking for a review can lead to confusion. For example, how should you ask? An email? Comment? Chat message?

Without a formal process, reviews can be inconsistent and hard to keep track of. Previously, an option was to assign a reviewer to a merge request, but even with this formality, both the author and the reviewer appeared in the same assignee field, making it hard for other team members to know who was doing what.

GitLab 13.7 introduces reviewers for merge requests, which allows authors to request a review from someone.
The new “Reviewers” field allows users to be designated as reviewers in a similar way to assignees. The reviewers receive a notification inviting them to review the merge request.

This provides a formal process for requesting a review and clarifies the roles of each user in a merge request.

Future iterations will include showing the most relevant reviewers for a merge request as well as a streamlined merge request approval flow that puts reviewers at the center.
You can follow along in the merge request reviewer assignment epic for more details.

https://about.gitlab.com/images/13_7/reviewers_sidebar.png -- Reviewers for Merge Requests

See Documentation and Issue.

And the same GitLab 13.7 (December 2020) facilitates that review process with:

Choose to show one file at a time directly from merge requests

Merge request reviews are an essential task to ensure quality code from contributors, as this is where most of the communication between author and reviewer takes place. However, as merge requests become larger and more files are involved, navigation and performance of merge request diffs can become difficult.

GitLab 13.7 introduces the option to show one file at a time in the merge request view. As you navigate to the Changes tab of the merge request, click the gear icon and check the box labeled Show one file at a time. This will display a single file at a time and enable the Prev and Next buttons to navigate among files.

Single file mode provides a cleaner workspace and enhances the reviewer focus on a single file, while improving the performance and navigation of the merge request diff.

https://about.gitlab.com/images/13_7/singlefile-mode.png -- Choose to show one file at a time directly from merge requests

See Documentation and Issue.

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283