jj-domino is a GitHub pull request stack manager for Jujutsu. jj-domino can create pull requests that are "stacked" on top of each other, allowing you to send out pull requests that depend on changes in other pull requests without having to merge them first.
$ jj git clone https://github.com/octocat/Hello-World.git
$ cd Hello-World
$ touch foo.txt
$ jj commit -m "Add foo.txt"
$ touch bar.txt
$ jj commit -m "Add bar.txt"
$ jj-domino -c 'trunk()..@-'
Creating bookmark push-lvlupwyrvtrq for revision lvlupwyrvtrq
Creating bookmark push-vkoqnzswumlq for revision vkoqnzswumlq
Changes to push to origin:
Add bookmark push-lvlupwyrvtrq to 7f016689053c
Add bookmark push-vkoqnzswumlq to fd73fcd14312
#1234: Add foo.txt [main ← push-vkoqnzswumlq] (new)
#1235: [DRAFT] Add bar.txt [main ← push-lvlupwyrvtrq] (new)jj-domino keeps stacked pull requests as drafts, since they include all the commits up to the pull request's bookmark. To simplify review, jj-domino adds a link in each stacked pull request's description to view the changes from the commits unique to the stacked pull request. For example, #1235 in the demo above would include a note like this:
How to Review
This pull request is a draft because it is intended to be merged after #1234. The new changes are in the last commit.
Related Pull Requests
This pull request is part of a stack managed by jj-domino:
- #1234
- → this pull request ←
Assuming you already have Jujutsu installed:
- Install Go
go install zombiezen.com/go/jj-domino@latest- Authenticate to GitHub using one of two options:
- Run
jj-domino auth github-login. - If you're already using the GitHub CLI, then run
gh auth login.
- Run
A common workflow is to use jj-domino -c when first creating the pull request(s).
For example, to create a single pull request:
$ jj new 'trunk()'
$ touch foo.txt
$ jj commit -m 'Add foo.txt'
$ jj-domino -c @-
Creating bookmark push-vkoqnzswumlq for revision vkoqnzswumlq
Changes to push to origin:
Add bookmark push-vkoqnzswumlq to fd73fcd14312
#1234: Add foo.txt [main ← push-vkoqnzswumlq] (new)Then you can use jj-domino without arguments to update the pull request(s).
Without arguments, jj-domino will create or update a pull request for each bookmark
in the revset trunk()..@.
For example, to incorporate some changes:
$ echo "add a line" >> foo.txt
$ jj squash
$ jj-domino
Changes to push to origin:
Move sideways bookmark push-vkoqnzswumlq from fd73fcd14312 to 0dcc295c3c92
#1234: Add foo.txt [main ← push-vkoqnzswumlq]
jj-domino also has other useful options like --dry-run.
Run jj-domino submit --help to see more documentation.
jj-domino attempts to work with existing Jujutsu configuration
rather than having its own settings.
For example, jj-domino will infer the GitHub repository based on the configured remotes
and will infer the default base branch using the trunk() revset alias.
These settings can be overridden with command-line flags.