Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation deletes a specific attachment from an issue in a repository hosted on a Gitea instance. It is useful when you want to programmatically remove unwanted or outdated attachments linked to issues, helping maintain clean and relevant issue discussions.

Practical examples include:

  • Automatically cleaning up attachments after issue resolution.
  • Removing sensitive files accidentally uploaded to an issue.
  • Managing storage by deleting large or unnecessary attachments.

Properties

Name Meaning
Owner The owner of the repository where the issue exists.
Repo The name of the repository containing the issue.
Index The index (number) identifying the specific issue within the repository.
Attachment Id The unique identifier of the attachment to be deleted from the issue.

Output

The node outputs JSON data representing the result of the delete operation. Typically, this will confirm whether the attachment was successfully deleted or provide error information if the deletion failed.

No binary data output is expected for this operation.

Dependencies

  • Requires an API key credential for authenticating with the Gitea API.
  • Needs the base URL of the Gitea instance configured in the credentials.
  • Relies on the Gitea REST API endpoint for issue attachments.

Troubleshooting

  • Common Issues:

    • Invalid or missing repository owner or name can cause "not found" errors.
    • Incorrect issue index or attachment ID may lead to failure in locating the resource.
    • Insufficient permissions or invalid API credentials will result in authorization errors.
  • Error Messages:

    • 404 Not Found: Check that the owner, repo, issue index, and attachment ID are correct.
    • 401 Unauthorized: Verify that the API key credential is valid and has necessary permissions.
    • 400 Bad Request: Ensure all required parameters are provided and correctly formatted.

Resolving these typically involves verifying input properties and ensuring proper API authentication.

Links and References

Discussion