Edit a comment
const url = 'https://gitea.com/api/v1/repos/example/example/issues/comments/1';const options = { method: 'PATCH', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"body":"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.com/api/v1/repos/example/example/issues/comments/1 \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "body": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner of the repo
Name of the repo
Id of the comment to edit
Request Body
Section titled “Request Body”EditIssueCommentOption options for editing a comment
object
Examplegenerated
{ "body": "example"}Responses
Section titled “Responses”Comment
Comment represents a comment on a commit or issue
object
Attachments contains files attached to the comment
Attachment a generic attachment
object
DownloadURL is the URL to download the attachment
DownloadCount is the number of times the attachment has been downloaded
ID is the unique identifier for the attachment
Name is the filename of the attachment
Size is the file size in bytes
UUID is the unique identifier for the attachment file
Body contains the comment text content
HTMLURL is the web URL for viewing the comment
ID is the unique identifier for the comment
IssueURL is the API URL for the issue
OriginalAuthor is the original author name (for imported comments)
OriginalAuthorID is the original author ID (for imported comments)
PRURL is the API URL for the pull request (if applicable)
User represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
The user’s website
Example
{ "user": { "login_name": "empty", "visibility": "public" }}APIEmpty is an empty response
APIForbiddenError is a forbidden error response
Headers
Section titled “Headers”APINotFound is a not found empty response
APIRepoArchivedError is an error that is raised when an archived repo should be modified