Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with the Gitea API to list attachments of a specific issue within a repository. It is useful when you want to retrieve all files or media attached to an issue for further processing, such as downloading, analyzing, or displaying them in workflows.

Practical examples include:

  • Automatically fetching and archiving all attachments from issues for backup.
  • Processing attachments to extract metadata or content.
  • Integrating issue attachments into other systems like document management or notification services.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where the issue exists.
Repo The name of the repository containing the issue.
Index The index (number) of the issue whose attachments you want to list.

Output

The node outputs JSON data representing the list of attachments associated with the specified issue. Each attachment typically includes metadata such as filename, size, URL, and possibly other descriptive fields depending on the Gitea API response.

If the node supports binary data output (not explicitly shown here), it would represent the actual file contents of attachments; however, based on the provided code snippet, only JSON metadata output is evident.

Dependencies

  • Requires an API key credential for authenticating with the Gitea instance.
  • Needs the base URL of the Gitea server configured in credentials.
  • Depends on the Gitea REST API being accessible and the user having permission to read issues and their attachments.

Troubleshooting

  • Common Issues:

    • Incorrect owner or repo names will result in "Not Found" errors.
    • Providing an invalid issue index may cause the API to return an error or empty results.
    • Network connectivity problems or incorrect API URL configuration can prevent successful requests.
  • Error Messages:

    • 404 Not Found: Verify that the owner, repo, and issue index are correct and that the authenticated user has access.
    • 401 Unauthorized: Check that the API key credential is valid and has sufficient permissions.
    • Network Errors: Ensure the Gitea server URL is reachable from n8n and no firewall blocks exist.

Links and References

Discussion