Skip to main content
// List all repositories
const repos = await store.listRepos();
console.log(`Found ${repos.repos.length} repositories`);

for (const repo of repos.repos) {
  console.log(`${repo.repoId}: ${repo.defaultBranch}`);
  if (repo.baseRepo) {
    console.log(`  Synced with: ${repo.baseRepo.owner}/${repo.baseRepo.name}`);
  }
}

// With pagination
const page = await store.listRepos({
  limit: 20,
  cursor: repos.nextCursor,
});

// Iterate through all pages
let cursor: string | undefined;
do {
  const result = await store.listRepos({ limit: 50, cursor });
  for (const repo of result.repos) {
    console.log(repo.repoId);
  }
  cursor = result.nextCursor;
} while (cursor);

Options

cursor
string
Pagination cursor from a previous response
limit
string
Maximum repositories per page (default: 20, max: 100)
ttl
string
Token TTL for this invocation in seconds.

Response

repos
array
List of repository info objects
nextCursor
string
Cursor for the next page (absent when no more results)
hasMore
boolean
Whether more repositories exist

Repository Info

repoId
string
Repository identifier
url
string
Repository URL
defaultBranch
string
Default branch name
createdAt
string
ISO 8601 creation timestamp
baseRepo
string
Git Sync configuration (provider, owner, name)