Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node allows users to interact with a Gitea repository's release attachments by editing an existing attachment. Specifically, it targets the "Repo Edit Release Attachment" operation within the "Repository" resource. This operation is useful when you need to update metadata of a release attachment, such as renaming the attachment without re-uploading it.

Practical examples include:

  • Correcting or updating the name of a file attached to a release.
  • Managing release assets programmatically in CI/CD pipelines.
  • Automating release management workflows where attachment details need modification.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where the release exists.
Repo The name of the repository containing the release.
Id The unique identifier of the release whose attachment is being edited.
Attachment Id The unique identifier of the specific attachment to edit within the release.
Name The new name to assign to the attachment.

Output

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

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to a Gitea instance via its 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

  • Common issues:

    • Invalid or missing repository owner or repo name can cause "Not Found" errors.
    • Incorrect release or attachment IDs will result in errors indicating the resource does not exist.
    • Insufficient permissions or invalid API tokens may lead to authorization errors.
    • Providing an empty or invalid new name might cause validation errors from the API.
  • Error messages and resolutions:

    • 404 Not Found: Verify that the owner, repo, release ID, and attachment ID are correct.
    • 401 Unauthorized: Check that the API token is valid and has sufficient permissions.
    • 400 Bad Request: Ensure the new name is properly formatted and not empty.

Links and References

Discussion