hands-on lab

Automating Code Reviews Using Generative AI

Difficulty: Beginner
Duration: Up to 1 hour and 30 minutes
Students: 17
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Generative AI models are capable of generating human-like text based on a prompt. A popular use case for them in the software development context is to summarize, review, and critique code changes. By incorporating Generative AI models into actions, you can automate complex tasks that previously required human attention, such as code reviews.

Learning how to use a Generative AI model in a continuous integration/continuous deployment (CI/CD) pipeline will benefit anyone looking to make use of Generative AI models in their software development workflows.

In this hands-on lab, you will implement a Gitea action that summarizes code changes in a pull request using a Generative AI model and adds the summary to the pull request.

Learning objectives

Upon completion of this beginner-level lab, you will be able to:

  • Use the Git command-line interface to make changes to a remote Gitea repository.
  • Implement a Gitea action that uses a Generative AI model to summarize code changes.
  • Post a summary of the code changes to a pull request.
  • Test the Gitea action workflow you implemented.

Intended audience

  • Anyone looking to learn more about using Generative AI models
  • Cloud Architects
  • Data Engineers
  • DevOps Engineers
  • Machine Learning Engineers
  • Software Engineers

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • The Git version control system
  • GitHub Actions or similar CI/CD tools
  • Python programming language
  • Bash scripting

The following content can be used to fulfill the prerequisites:

Environment before

Environment after

Covered topics

Lab steps

Cloning a Gitea Repository
Adding a Variable to a Gitea Respository
Creating a Gitea Action
Testing Your Gitea Action