Skip to main content
Update mutable repository fields. Required scope: write
const repo = await mesa.repos.update({
  repo: 'app',
  default_bookmark: 'main',
  tags: { env: 'prod', stale: null },
});

Options

repo
string
required
Current repository name.
org
string | undefined
Organization override.
name
string | undefined
New repository name.
default_bookmark
string | undefined
New default bookmark name.
tags
Record<string, string | null> | undefined
Patch repository tags. String values set tags, null removes tags, and omitted keys are unchanged.
upstream
object | null | undefined
Set, replace, or remove the upstream remote. Omit to preserve the current upstream, pass null to remove it, or pass an object to attach/update it.

Upstream auth updates

On update, upstream credentials are tri-state: omit upstream to preserve the whole upstream, pass upstream: null to remove it, pass upstream.auth: null to clear credentials, or pass token / username-password auth to replace credentials.

Response

id
string
Repository ID.
org
string
Organization slug.
name
string
Repository name.
default_bookmark
string
Default bookmark name.
head_change_id
string
Current change ID at the default bookmark tip.
upstream
UpstreamConfig | null
Configured upstream remote, or null when no upstream is configured.
created_at
string
Creation time.
tags
Record<string, string>
Repository tags.

UpstreamConfig

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