Skip to main content
// List commits from default branch
const commits = await repo.listCommits();

// List commits from specific branch
const branchCommits = await repo.listCommits({
  branch: "feature/new-auth",
  limit: 20,
});

Options

branch
string
Branch name to list commits from. Defaults to the default branch.
limit
string
Maximum number of commits to return
cursor
string
Pagination cursor from a previous response

Response

commits
array
List of commit objects
nextCursor
string
Cursor for the next page (absent when no more results)