Skip to content

Monorepo: Split changes into reviewable PRs

Created by: malomarrec

TL;DR Once we have ownership data inside Sourcegraph, in monorepos, we could automatically split up diffs into small reviewable PRs and assign them to owners.

Context

Large monorepos make it easier to change code across the codebase. The key problem monorepo customers face is having automated code changes reviewed. So far, we've taken the approach of splitting diffs into several PRs depending on the structure of the repo, either by identifying workspaces if a certain file is present with rootAtLocationOf or by explicitly setting a list of workspace oaths with transformChanges.

Proposal

If we get ownership data into Sourcegraph, we could change that approach so that Batch Changes can just split up the diff by reviewer, and automatically assign each PR to the right reviewers.