background

CodeReview is a great way to learn and an important way for team members to interact.

I searched the Web for CodeReview tools, many of which were limited by information security limitations.

Around the corner, I decided to use gitLab’s own features and help with some VsCode plug-ins. Although a little inconvenient, it basically meets the needs of our front end team at this stage: add comments to Code and be able to notify the relevant people

cycle

CodeReview closed loop is completed once every two weeks

way

Divide into groups according to the project team. In small groups, the two groups conduct code Review among each other. Suppose there are two groups: group A and group B, in which group A initiates and Group B makes comments.

Group A: Develop, Group A: Approver, group B: Reviewer.

The process is as follows:

Procedure (TocommitRecord as an example)

  • Select aCommitRecord, mouse over the code will prompt'Add commont to this line'.

  • Click on theCommentSmall icon to add comments and @ related people. Important: there should be a space before the @.

  • When other people add comments and @ you, inTodosThere will be reminders (you can experiment with each other).

  • Click on theTodosThe row will enter the corresponding comment list (the specific comment page is slow to load), clickDoneWill end the codereview.

Auxiliary plug-in

This is a bit of a hassle (especially for the @ person), but it lets you loop a CodeReview once. On top of this, you can install the VSCode plug-in Gitlab Notifications, which will be prompted in VSCode.

Clicking on the Notifications icon will redirect you to Todos in GitLab.

The following configurations need to be added:

    "gitlab-notifications.url": "http://10.250.112.151:18888/"."gitlab-notifications.privateToken": "GFjuNTPC8vQfJ8RRzcx2".Copy the code

The privateToken is obtained from the User setting-account of Gitlab:

10.250. XXX. XXX: 88888 / profile/acc…

Matters needing attention

Since the commit code may be small, code comments can be directed to the entire project file. CodeReview Developers Develop @reviewer in a single document, with Reviewer commenting on a single or multiple documents in a project.

Loop through each other’s code in turn