Slide 1

Slide 1 text

Automation in Code Review Alina Mihaila Sr Backend Engineer at GitLab

Slide 2

Slide 2 text

Automation in Code Review ● What is code review? ● What can be automate in code reviews? ● Tools that assist with code review at GitLab ● What is next? ● Q&A

Slide 3

Slide 3 text

Code Review process at GitLab ● Code changes are reviewed by minimum 2 engineers (reviewer + maintainer) ● Code reviews for multiple categories (frontend, backend, database, UX, QA) ● Code review for multiple domain expertise CI, Product Intelligence, Tooling ) ● Example MR with multiple reviewers

Slide 4

Slide 4 text

What can be automate in code reviews? Source: monkeyuser.com Example MR vale

Slide 5

Slide 5 text

Automation examples in code review at GitLab ● Code Quality Widget ○ Uses codeclimate ○ Example MR

Slide 6

Slide 6 text

Automation examples in code review at GitLab ● Test coverage visualization ○ Simplecov(Ruby) ○ (Istanbul)JavaScript ○ PHP Unit PHP ○ gocover(Go lang) ○ Coverage.py(Python) ○ Example of MR

Slide 7

Slide 7 text

Automation examples in code review at GitLab ● Danger (GitLab, Github, Bitbucket) ○ Automates common code review task ○ Runs in CI ○ Codify code guidelines (using the danger files) ○ Ruby and Javascript ○ GitLab Danger gem(Roulette) ○ Example MR1, MR2

Slide 8

Slide 8 text

More automation examples in code review ● Automated database migration testing (Example MR) ○ Uses postgres.ai thin-clone technology. ○ Runs migration on GitLab.com dataset. ○ Used before the migration code is merged and deployed. ○ Analyze migrations and behaviour before deploying to production.

Slide 9

Slide 9 text

What is next? ● Unreview ○ GitLab recently announced Machine Learning based solution for automatically identifying appropriate expert code reviewer Here is an early mockup (and it may differ from our final UI)

Slide 10

Slide 10 text

Q&A Contact ● [email protected] ● Linkedin

Slide 11

Slide 11 text

● How to carry out effective code reviews ● The code review struggle is real. Here's what you need to know ● What are the most effective features for code review tools? ● How GitLab's 5 new code review features will make life easier ● Faster Code Reviews ● The road to smarter code reviewer recommendations ● Code Review Guidelines ● Code review docs Resources