Skip to content

Components of a Code Review

Code Review Components

By default Sourcery's code reviews in GitHub or GitLab have the following pieces:

PR Summary

At the top of each PR we add in a summary of the major changes to the code.

PR Summary

You can trigger a re-generation of the PR summary by writing @sourcery-ai summary in the PR body or in a comment on the PR.

Review Guide

The review guide thematically groups together each of the major changes made in the PR and lists which files contribute to those changes.

Review Guide

Diagrams

If applicable, Sourcery will also provide diagrams to help you understand the changes made in the PR.

Diagrams

Linked Issue Analysis

If there is a GitHub issue or Jira ticket* linked to the PR, Sourcery will assess whether the PR addresses the issue. Sourcery will also try to find any other issues that are related to the PR and list them.

You can trigger a re-generation of the review guide by writing @sourcery-ai guide in a PR comment.

*Requires the Sourcery x Jira integration to be set up

Overall Review

Each review has a primary review comment where Sourcery gives its overall impression of the changes and gives feedback on higher level issues around the code change.

Overall Review

Within the main review section is a collapsed Prompt for AI Agents. Expand this section to view Sourcery's comment prompt to an AI agent and copy and paste it into your agent of choice to have it automatically address Sourcery's comments.

Agent Comments

Individual Review Comments

Sourcery will place comments in line for individual sections of code with feedback that is specific to that code change.

Individual Comments

Configuring the pieces of a code review

You can enable or disable each of these sections of Sourcery's code reviews depending on what you want to see on each pull request. To update your settings go to the Review Settings section of your Sourcery dashboard.

For more details please see the code reviews configuration section of our docs.