Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node allows editing an attachment on an issue comment within a repository hosted on a Gitea instance. It is useful when you need to update metadata (such as the name) of an existing attachment linked to a comment on an issue. For example, if an attachment was uploaded with an incorrect or unclear filename, this node can rename it without needing to re-upload the file.

Common scenarios include:

  • Correcting or clarifying attachment names on issue comments.
  • Managing attachments programmatically in bulk workflows.
  • Integrating with other systems that require updated attachment metadata.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where the issue comment exists.
Repo The name of the repository containing the issue comment.
Id The ID of the comment on the issue whose attachment is being edited.
Attachment Id The ID of the specific attachment on the comment that you want to edit.
Name The new name to assign to the attachment.

Output

The node outputs JSON data representing the updated attachment object after the edit operation. This typically includes fields such as the attachment's ID, updated name, URL, and other metadata returned by the Gitea API.

No binary data output is involved in this operation since it only modifies metadata of an existing attachment.

Dependencies

  • Requires connection to a Gitea instance via its REST API.
  • Needs an API authentication token credential configured in n8n to authorize requests.
  • The base URL for the Gitea API must be set in the credentials configuration.

Troubleshooting

  • Invalid Repository or Owner: If the specified owner or repo does not exist or is misspelled, the API will return an error. Verify these values carefully.
  • Comment or Attachment Not Found: Providing an incorrect comment ID or attachment ID will cause the request to fail. Ensure IDs are correct and correspond to existing resources.
  • Authentication Errors: Missing or invalid API credentials will prevent the node from connecting. Confirm that the API token has sufficient permissions.
  • Permission Denied: The authenticated user must have write access to the repository to edit attachments.
  • Empty or Invalid Name: If the new name property is empty or invalid, the API may reject the update. Provide a valid string for the attachment name.

Links and References

Discussion