Update a release
PATCH
/repos/{owner}/{repo}/releases/{id}
const url = 'https://gitea.example.com/api/v1/repos/example/example/releases/1';const options = { method: 'PATCH', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"body":"example","draft":true,"name":"example","prerelease":true,"tag_name":"example","target_commitish":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://gitea.example.com/api/v1/repos/example/example/releases/1 \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "body": "example", "draft": true, "name": "example", "prerelease": true, "tag_name": "example", "target_commitish": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”owner
required
string
Owner of the repo
repo
required
string
Name of the repo
id
required
integer format: int64
Id of the release to edit
Request Body
Section titled “Request Body”Media typeapplication/json
EditReleaseOption options when editing a release
object
body
string
draft
boolean
name
string
prerelease
boolean
tag_name
string
target_commitish
string
Examplegenerated
{ "body": "example", "draft": true, "name": "example", "prerelease": true, "tag_name": "example", "target_commitish": "example"}Responses
Section titled “Responses”Release
Media typeapplication/json
Release represents a repository release
object
assets
Array<object>
Attachment a generic attachment
object
browser_download_url
string
created_at
string format: date-time
download_count
integer format: int64
id
integer format: int64
name
string
size
integer format: int64
uuid
string
author
User represents a user
object
active
Is user active
boolean
avatar_url
URL to the user’s avatar
string
created
string format: date-time
description
The user’s description
string
email
string format: email
followers_count
User counts
integer format: int64
following_count
integer format: int64
full_name
The user’s full name
string
id
The user’s id
integer format: int64
is_admin
Is the user an administrator
boolean
language
User locale
string
last_login
string format: date-time
location
The user’s location
string
login
The user’s username
string
login_name
The user’s authentication sign-in name.
string
prohibit_login
Is user login prohibited
boolean
restricted
Is user restricted
boolean
starred_repos_count
integer format: int64
visibility
User visibility level option: public, limited, private
string
website
The user’s website
string
body
string
created_at
string format: date-time
draft
boolean
html_url
string
id
integer format: int64
name
string
prerelease
boolean
published_at
string format: date-time
tag_name
string
tarball_url
string
target_commitish
string
upload_url
string
url
string
zipball_url
string
Example
{ "author": { "login_name": "empty" }}APINotFound is a not found empty response
Media typeapplication/json