When software changes affect multiple git repositories (a.k.a “repos”), coordinating Pull-Requests (PRs) across repos creates a surprising amount of overhead: opening numerous PRs, getting them approved by various code owners, keeping an eye on the many CI pipelines running, ensuring all tests pass on each repo, and finally trying to merge them all simultaneously (or in quick succession) to ensure dependencies don’t break. Phew!
As the team scales, this overhead compounds and gets worse: merge conflicts, build failures, and breaking dependencies across changes from various developers on the team makes the code-submission process almost as hard as writing code itself!
We built ChangeSets to help solve this.
ChangeSets are a way to group PRs across multiple repositories and treat them as part of a single, broader unit of change.
With ChangeSets, developers can test, review and coordinate changes across repositories with ease. When the ChangeSet is ready to be merged, the PRs within it are treated as an all-or-nothing merge group: if *all* associated PRs are mergeable, they’re merged simultaneously into their respective repositories, but if any of them fail a validation check (or is in a non-mergeable state for any other reason), *none* of the PRs within the ChangeSet are merged. And of course, if you need to roll back a change, with ChangeSets you’ll be able to roll back all associated PRs, across the many repositories they span.
ChangeSets also offer webhooks that you can use to trigger builds and CI pipelines on the whole change (eg: trigger a “global build” that tests all changes together before any of them are merged). Payloads for these webhooks are heavily customizable, but by default they all contain branch name, PR numbers and commit SHAs for all the associated PRs within the ChangeSet.
External CI systems can send validation results (and other relevant information) back to the associated ChangeSet via an API call.
Here’s how you’d use a ChangeSet
1. Navigate to “ChangeSet” on the sidebar and click the “Create New” button.
2. Select the PRs you want grouped in this ChangeSet by clicking “Add to ChangeSet” on the relevant PRs. We have filters to help you search for PRs by repository name and Github username.
3. If you have a “global build” or CI pipeline that you’d like to run on this ChangeSet (i.e: a CI pipeline that’s not repo-specific, but runs on the entire build across repositories), you can trigger a run of that system by clicking the “Start CI” button on the ChangeSet. Note: the URL to trigger this CI pipeline will have to be linked on “Webhooks” -> “Global Webhook URL” for this functionality to work.
4. Once you’re happy with the ChangeSet and it’s ready to merge, simply click the “Merge” button on the ChangeSet.
5. See the history of CI runs on this ChangeSet at any time by clicking the “History” button that appears after your first CI run.
We hope you find ChangeSets useful in your cross-repo workflows. To give it a whirl, sign up using this link (or send us an email at email@example.com and we’ll enable ChangeSets on your existing MergeQueue account). We’d also love to hear your ideas and feedback – we’ve got a lot of cool new features in the works, and hearing your thoughts will help shape ChangeSets!