Skip to main content
Update fields on a repository. Omitted keyword arguments are left unchanged. Required scope: write
Update upstream credentials without changing other repository fields:

Options

str
required
Repository name to update.
str | None
Organization override.
str | None
New repository name.
str | None
New default bookmark name.
UpstreamConfig | None | Unset
Omit to leave upstream unchanged. Pass None to remove the upstream entirely. Pass UpstreamConfig to set or replace the upstream URL.

Upstream auth tri-state

UpstreamConfig.auth has different meanings on update:

Response

str
Repository ID.
str
Organization slug.
str
Repository name.
str
Default bookmark name.
str
Current change ID at the default bookmark tip.
UpstreamConfig | None
Configured upstream remote, or null when no upstream is configured.
datetime
Creation time.
dict[str, str]
Repository tags.

UpstreamConfig

str
Upstream Git remote URL.
'token' | 'username_password' | None
Stored upstream authentication kind, or null when the upstream is public.