Options
| Parameter | Type | Description |
|---|---|---|
id | Optional | Repository ID. If not provided, a UUID will be auto-generated. Supports namespacing with / (e.g., team/project-alpha). |
defaultBranch (TypeScript)default_branch (Python) | Optional | Default branch name for the repository. Defaults to main. |
baseRepo (TypeScript)base_repo (Python) | Optional | Configuration for GitHub sync or forking from an existing repository. See below for structure. |
ttl | Optional | Token TTL in seconds for this invocation. Defaults to 3600 (1 hour). |
BaseRepo for GitHub Sync
Use this structure to sync with a GitHub repository:| Property | Type | Description |
|---|---|---|
owner | Required | GitHub repository owner (username or organization). |
name | Required | GitHub repository name. |
defaultBranch (TypeScript)default_branch (Python) | Optional | GitHub repository’s default branch. |
WhenbaseRepocontainsownerandname, Code Storage links the repository to GitHub for automatic syncing. See the GitHub Sync guide for details.
BaseRepo for Forking
Use this structure to fork from an existing Code Storage repository:| Property | Type | Description |
|---|---|---|
id | Required | The source repository ID to fork from. |
ref | Optional | Branch or tag name to fork from. Forks the tip of this ref. |
sha | Optional | Exact commit SHA to fork at. Overrides ref if both are provided. |
WhenbaseRepocontainsid, a fork is created from the specified repository. See the Forking guide for details.
Response
Returns aRepository instance with the following properties:
| Property | Type | Description |
|---|---|---|
id | String | The repository identifier |
defaultBranch (TypeScript)default_branch (Python) | String | The repository’s default branch name (e.g., main) |