Skip to main content
// List all branches
const branches = await repo.listBranches();
console.log(branches.branches); // Array of branch info

// With pagination
const page = await repo.listBranches({
  limit: 10,
  cursor: branches.nextCursor,
});

// List branches in the ephemeral namespace
const previews = await repo.listBranches({ ephemeral: true });

Options

limit
string
Maximum branches per page
cursor
string
Pagination cursor from a previous response
ephemeral
boolean
List branches from the ephemeral namespace instead of the persistent one (default: false)

Response

branches
array
List of branch info objects
nextCursor
string
Cursor for the next page (absent when no more results)