Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows editing an existing attachment on a specific issue within a repository hosted on a Gitea instance. It is useful when you need to update metadata of an issue attachment, such as renaming the attachment without re-uploading it.

Common scenarios include:

  • Correcting or updating the name of an attachment linked to an issue.
  • Managing issue attachments programmatically in automated workflows for project management or bug tracking.

Example: You have an issue with an incorrectly named attachment and want to rename it via an automated workflow instead of manually editing it through the Gitea UI.

Properties

Name Meaning
Owner The owner (user or organization) of the repository containing the issue.
Repo The name of the repository where the issue exists.
Index The index (number) identifying the specific issue within the repository.
Attachment Id The unique identifier of the attachment on the issue 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.

Dependencies

  • Requires connection to a Gitea instance via its REST API.
  • Needs an API authentication token or key configured in n8n credentials to authorize requests.
  • The base URL of the Gitea server must be set in the node credentials.

Troubleshooting

  • Issue not found: If the specified issue index does not exist, the API will return an error. Verify the issue number is correct.
  • Attachment not found: If the attachment ID is invalid or does not belong to the issue, the edit will fail.
  • Authentication errors: Ensure the API token or credentials are valid and have sufficient permissions to edit issue attachments.
  • Invalid input: Providing empty or malformed values for required properties like owner, repo, or attachment ID may cause request failures.
  • API endpoint changes: If the Gitea API version changes, verify compatibility with the node implementation.

Links and References

Discussion