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

Automation in Code Reviews

Automation in Code Reviews

Sibiu Web Meetup

February 18, 2022
Tweet

More Decks by Sibiu Web Meetup

Other Decks in Programming

Transcript

  1. 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
  2. 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
  3. Automation examples in code review at GitLab • Code Quality

    Widget ◦ Uses codeclimate ◦ Example MR
  4. 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
  5. 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
  6. 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.
  7. 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)
  8. • 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