Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Automation in Code Reviews

Automation in Code Reviews

98ede30a4a96e7c5547dc964b391e2ed?s=128

Sibiu Web Meetup

February 18, 2022
Tweet

More Decks by Sibiu Web Meetup

Other Decks in Programming

Transcript

  1. Automation in Code Review Alina Mihaila Sr Backend Engineer at

    GitLab
  2. 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
  3. 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
  4. What can be automate in code reviews? Source: monkeyuser.com Example

    MR vale
  5. Automation examples in code review at GitLab • Code Quality

    Widget ◦ Uses codeclimate ◦ Example MR
  6. 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
  7. 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
  8. 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.
  9. 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)
  10. Q&A Contact • alina.vancea@gmail.com • Linkedin

  11. • 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