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

ParameterTypeDescription
cursorOptionalPagination cursor from a previous response
limitOptionalMaximum repositories per page (default: 20, max: 100)
ttlOptionalToken TTL in seconds for this invocation

Response

FieldTypeDescription
reposArrayList of repository info objects
nextCursor (TypeScript)
next_cursor (Python)
OptionalCursor for the next page (absent when no more results)
hasMore (TypeScript)
has_more (Python)
BooleanWhether more repositories exist

Repository Info

FieldTypeDescription
repoId (TypeScript)
repo_id (Python)
StringRepository identifier
urlStringRepository URL
defaultBranch (TypeScript)
default_branch (Python)
StringDefault branch name
createdAt (TypeScript)
created_at (Python)
StringISO 8601 creation timestamp
baseRepo (TypeScript)
base_repo (Python)
OptionalGitHub sync configuration (provider, owner, name)