Some teammates at Sourcegraph use Graphite to managed “stacked PRs” - sets of pull requests stacked atop each other - and optionally as a code review interface as well. From the Graphite overview documentation:

The Graphite CLI is a tool to help you break up large engineering tasks into a series of small, incremental code changes directly from the command line. The Graphite CLI makes it easy to stay unblocked as an author, develop faster, and provide more helpful comments as a reviewer.

Head over to #chat-graphite for internal discussions about Graphite!



Getting started

Graphite is primarily used in the command line with the gt CLI:

brew install withgraphite/tap/graphite
gt --version
gt auth --token <YOUR_AUTH_TOKEN> # from <https://app.graphite.dev/activate>

Refer to the Graphite quickstart for more details. Graphite also has a nice introductory article about why stacking PRs is helpful, and how to get started:

https://graphite.dev/blog/stacked-prs

Graphite App GitHub checks

The Graphite App adds CI checks for pull requests that are managed within a stack. This check suggests against merging pull requests at the “top” of a stack (with a “lower” PR as its merge base), as “stacks” are meant to be merged in bottom-first order, rebasing stacked PRs as merges happen. The Graphite CLI and service handles the process of merging stacked PRs in bottom-first order - see Merge a stack of PRs on Graphite.

These checks “run” for as long as downstack PRs remain open, as they serve only as a “this stack is still in progress” indicator, so the duration can appear very long - this is expected.

Untitled