跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!

Edit a comment

PATCH
/repos/{owner}/{repo}/issues/comments/{id}
curl --request PATCH \
--url https://gitea.com/api/v1/repos/example/example/issues/comments/1 \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "body": "example" }'
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

id
required
integer format: int64

Id of the comment to edit

Media typeapplication/json

EditIssueCommentOption options for editing a comment

object
body
required
string
Examplegenerated
{
"body": "example"
}

Comment

Media typeapplication/json

Comment represents a comment on a commit or issue

object
assets

Attachments contains files attached to the comment

Array<object>

Attachment a generic attachment

object
browser_download_url

DownloadURL is the URL to download the attachment

string
created_at
string format: date-time
download_count

DownloadCount is the number of times the attachment has been downloaded

integer format: int64
id

ID is the unique identifier for the attachment

integer format: int64
name

Name is the filename of the attachment

string
size

Size is the file size in bytes

integer format: int64
uuid

UUID is the unique identifier for the attachment file

string
body

Body contains the comment text content

string
created_at
string format: date-time
html_url

HTMLURL is the web URL for viewing the comment

string
id

ID is the unique identifier for the comment

integer format: int64
issue_url

IssueURL is the API URL for the issue

string
original_author

OriginalAuthor is the original author name (for imported comments)

string
original_author_id

OriginalAuthorID is the original author ID (for imported comments)

integer format: int64
pull_request_url

PRURL is the API URL for the pull request (if applicable)

string
updated_at
string format: date-time
user

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
html_url

URL to the user’s gitea page

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

Login of the user, same as username

string
login_name

Identifier of the user, provided by the external authenticator (if configured)

string
default: empty
prohibit_login

Is user login prohibited

boolean
restricted

Is user restricted

boolean
source_id

The ID of the user’s Authentication Source

integer format: int64
starred_repos_count
integer format: int64
visibility

User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate

string
Allowed values: public limited private
website

The user’s website

string
Example
{
"user": {
"login_name": "empty",
"visibility": "public"
}
}

APIEmpty is an empty response

Media typeapplication/json

APIForbiddenError is a forbidden error response

Media typeapplication/json
message
string
url
string

APINotFound is a not found empty response

Media typeapplication/json

APIRepoArchivedError is an error that is raised when an archived repo should be modified

Media typeapplication/json
message
string
url
string