hn.today

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

github.com3 points0 comments
Screenshot of jjack: A CLI and TypeScript library to help jj users manage PR stacks on GitHub

jjack is a command-line tool and TypeScript library for managing stacked GitHub pull requests from jj, a version-control system. Its central problem is that directly pushing edits to a lower change in a stack rewrites later commits, forcing updates to their branches and making it difficult for reviewers to see what changed. jjack uses the same basic strategy as jj-spr: it preserves commits already pushed to GitHub and represents new edits with additional commits and merge commits linking the stack. That way, updates appear as new work on each pull request rather than replacing commits reviewers have seen. The project argues that this workaround exists because Git and GitHub lack a good way to represent and display stacked changes and their successive differences.

Users can describe a stack in a JSON file, with each entry identifying a change and optionally its pull-request title or body, or generate one pull request per change. Commands initialize and inspect stacks, adopt existing pull requests, submit or update them, merge them from the bottom upward, synchronize local changes after merges, and close pull requests. Configuration can reuse jj-spr settings; the tool requires Node 24, jj, and Git, and typically uses GitHub’s CLI for authentication. Its library exposes the same operations with typed results and errors. The maintainer says the code was generated with AI and has not been personally reviewed, and explicitly suggests established alternatives such as jj-spr, jj-ryu, and jj-stack for people seeking a tool to use. Tests exercise a simulated GitHub API and repository.

Read on github.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Lua as a Query Language

Lua as a Query Language

Lua can serve as a dynamic query language by expressing relational operations as Lua code that builds an AST for a Rust backend, avoiding a custom parser and Rust recompilation for ad hoc queries. Lua variables provide reusable views and built-in language features support query constructs such as filters and arithmetic. (remy.wang)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.