Hacker News

jjack: A CLI and TypeScript library to help jj users manage PR stacks on GitHub

12 points by g0xA52A2A ago | 5 comments

1123581321 |next [-]

Neat. My own take on this. https://github.com/michaeldhopkins/jjpr

Getting it to run well for GitHub, Gitlab, and Codeberg/Forgejo has been a lot of the work. I’ve found that running e2e tests weekly is easiest because it keeps my multiple users for each platform signed in (I test approvals, other people merging, etc.)

Supporting jjpr has introduced me to a few more folks in the jujutsu community, which has been fun, and given me more appreciation for the flexibility of jujutsu (e.g. supporting diamond-shaped stacks.)

It was also fun to come into the era of native GitHub stacks with strong opinions, including that they should offer an API to render third party stacks with nicer UI than a first comment and hidden description metadata. :)

That said, while I’m still maintaining jjpr, it seems better to just keep the stack locally and feed merged to main to your teammates with well written descriptions, rather than racing ahead and giving them potentially confusing choices of what to read. The bottleneck is review more than coding on a conscientious team.

andrewaylett |next |previous [-]

I had a similar thought, and the result is https://github.com/andrewaylett/jj-gh/

One feature I quite enjoy is the ability to sync PR summaries to match their commit message. Another is the fix up, which reparents any PRs that might have been shuffled since they were created.

I'm not necessarily going to be submitting long stacks, or often, but it works on a "stack" of one, too! And I will probably get around to making it cleaner to use on octopus merges at some point.

Like the OP, not something I'm necessarily expecting other folk to want to use -- but I've been using it since I created it. It was probably less effort to build than it would have been to pick up someone else's tool and give myself confidence that it actually did what I want it to do :).

jiggunjer |previous [-]

I think jj users often use a megamerge model, this doesn't translate well to stacked PRs which assume a linear history.

Zambyte |root |parent [-]

Huh, really? I started using stacked PRs more intentionally when I switched to jj, because looking through the jj repo history with jj made that feel like the obvious thing to do.

andrewaylett |root |parent [-]

It's easy to stack, but then it's also easy to Octopus merge. And what you do with your own branches and PRs doesn't necessarily make any difference to what the merged result looks like.

I found it much easier for my team if I gave them independent PRs when the PRs could be independent, and JJ makes throwing commits around so easy that it's absolutely not going to be the bottleneck that pushes me to one approach vs another. They're going to land on `main` sequentially whichever way I develop them, because that's our (my) convention for `main`.