Skip to main content
These endpoints expose jj-native VCS operations that have no direct GitHub equivalent. They are proxied through the JJHub API to the Rust repo-host which uses jj-lib natively.

jj VCS API

JJHub is a jj-native platform. All version control operations use jj concepts: Change IDs, Bookmarks, Operation Logs, and stacked changes. These endpoints provide direct access to jj VCS operations on repositories.

Bookmarks

Bookmarks are jj’s equivalent of Git branches. Unlike Git branches, bookmarks are explicit pointers that don’t automatically advance - you must explicitly move them.

List Bookmarks

Response:

Create Bookmark

Request:
Response:

Get Bookmark

Update Bookmark

Request:

Delete Bookmark


Changes

A Change is jj’s equivalent of a commit, but with a stable Change ID that persists even when the commit is amended or rebased. Every change has:
  • A Change ID: a stable identifier (e.g. wqnwkozp) that never changes
  • A Commit ID: the underlying Git commit hash (changes on amend)
  • A description: the commit message
  • One or more parents: the change’s ancestors

List Changes

Returns the change tree (commit graph) for a repository.
Query parameters: Response:
Pagination metadata is returned in the standard Link and X-Total-Count headers described in the Pagination guide.

Get Change


Diffs

Get Change Diff

Returns the diff for a specific change.
Query parameters: Response:

Operation Log

The Operation Log is one of jj’s most powerful features. Every jj operation (commit, rebase, undo, etc.) is recorded in the operation log, making any operation undoable. This is analogous to Git’s reflog but for all operations, not just branch moves.

List Operations

Query parameters: Response:
Pagination metadata is returned in the standard Link and X-Total-Count headers described in the Pagination guide.

Stacked Changes

JJHub’s premiere feature is first-class support for stacked changes - a series of changes where each builds on the previous. This enables incremental review and is particularly powerful for AI-assisted development. A stack looks like:
Landing requests can target any change in the stack. The landing queue ensures correct ordering when multiple changes in a stack are landed.

Commit Statuses

Commit statuses let external systems (CI/CD pipelines, code quality tools, security scanners) report the outcome of checks against a specific commit. Statuses are the mechanism by which JJHub knows whether a change has passed CI, failed a linter, or is still being validated. Statuses are the foundation for two key features:
  • jjhub land checks — shows the CI status of all changes in a landing request
  • Bookmark protection — the --require-status-checks rule gates landing until all statuses report success

Status States

Each status has a state field with one of four values: Both failure and error block landing when --require-status-checks is enabled on the target bookmark. The distinction exists so operators can differentiate between “the code has a problem” (failure) and “the CI system has a problem” (error).

Context

Each status is identified by a context string that names the check. Multiple statuses can exist on the same commit as long as they have different contexts. Examples: If a new status is posted with the same context as an existing status on the same SHA, the existing status is replaced. This is how a workflow updates a status from pending to success or failure.

Create a Commit Status

Report the result of a check against a specific commit SHA.
Request body: Example:
Response (201 Created):

Get Commit Statuses

Retrieve all statuses reported against a commit ref (SHA, bookmark name, or change ID).
Path parameters: Query parameters: Example:
Response:

Combined Status

When multiple statuses exist on a commit, JJHub computes a combined status using these rules: The combined status is what bookmark protection evaluates. If --require-status-checks is enabled, the combined status of every commit in the landing request must be success for the merge to proceed. The jjhub land checks command displays both individual statuses and the combined status:

How Workflows Set Statuses Automatically

When a JJHub workflow runs against a commit, the platform automatically manages commit statuses on behalf of the workflow:
  1. Workflow starts — JJHub creates a pending status with context set to the workflow name (e.g., ci/test). The target_url points to the workflow run’s log page.
  2. Workflow completes successfully — JJHub updates the status to success with a description summarizing the result.
  3. Workflow fails — JJHub updates the status to failure (if the workflow’s steps failed) or error (if the runner itself had a problem).
This means most users never need to call the status API directly — their workflows create and update statuses automatically. The API is available for external CI/CD systems, third-party integrations, and custom tooling that runs outside of JJHub’s workflow system. Example workflow that implicitly sets a status:
When this workflow triggers, JJHub creates a pending status with context ci/test on the triggering commit. When bun test succeeds, the status updates to success. If it fails, the status updates to failure.

How Statuses Gate Landing Requests

Statuses integrate with bookmark protection to enforce quality gates:
  1. Enable status checks on a bookmark:
  2. Attempt to land a change: When jjhub land land is called, JJHub checks the combined status of every commit in the landing request’s change stack.
  3. If any commit has a non-success combined status, the landing is blocked:
  4. Once all statuses are success, the landing proceeds (assuming other protection rules like required reviews are also satisfied).
For stacked changes, every change in the stack must have a success combined status. This ensures that each logical change in the stack is independently validated.

CLI: Commit Status Commands

List and set commit statuses from the command line:

Webhook Events

When a commit status changes, JJHub fires a status webhook event. This lets external systems react to CI outcomes — for example, sending a notification when a previously-failing check turns green. The webhook payload includes the status details, the commit SHA, and the repository context. See the Webhooks API for delivery and signature details.

Key Differences from Git