Codeberg icon

Codeberg

Interact with the Codeberg API

Repository → Update

AI-generated

Summary

Update a repository owned by a specified user or organization by modifying its settings.

Inputs

  • Owner (required) — The username or organization name that owns the repository to update.
  • Repository Name (required) — The name of the repository to update.
  • Update Fields — A collection of repository properties to update, including 'Default Branch' (string), 'Description' (string), 'Has Issues' (boolean), 'Has Pull Requests' (boolean), 'Has Wiki' (boolean), 'Name' (string), 'Private' (boolean), and 'Website' (string). Only specify fields that you want to change.

Output shape

a single record representing the updated repository

Returns the full updated repository data as JSON. The operation uses PATCH to modify the specified fields on the repository. Requires authentication via access token or OAuth2.

Examples

Example 1: Update repository description and set repository as private

Owner: 'my-org', Repository Name: 'my-repo', Update Fields: { Description: 'New description', Private: true }

Links

Discussion