Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with the Gitea API to list webhooks configured for a specific repository. It is useful when you want to retrieve all hooks set up on a repository to monitor events such as pushes, pull requests, or issues. For example, a user might use this node to audit existing hooks before adding new ones or to synchronize webhook configurations across multiple repositories.

Properties

Name Meaning
Owner The username or organization name that owns the repository.
Repo The name of the repository from which to list the hooks.
Page The page number of results to return (1-based). Useful for paginating through many hooks.
Limit The number of hooks to return per page (page size).

Output

The node outputs JSON data representing the list of webhooks retrieved from the specified repository. Each item in the output array corresponds to a webhook object containing details such as its ID, URL, events it listens to, and configuration settings.

If the API supports binary data for any webhook-related content (not indicated here), it would be summarized accordingly, but based on the provided code and properties, the output is purely JSON.

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 endpoint /api/v1/repos/{owner}/{repo}/hooks to fetch the hooks.
  • Pagination parameters (page and limit) are sent as query parameters to the API.

Troubleshooting

  • Invalid Credentials: If authentication fails, ensure the API key and base URL are correctly configured.
  • Repository Not Found: Verify that the owner and repo names are correct and that the authenticated user has access.
  • Pagination Issues: If no hooks appear, check if the page and limit values are within valid ranges.
  • API Rate Limits: Frequent calls may hit rate limits; handle errors gracefully and consider retry logic.
  • Empty Results: An empty array means no hooks are configured for the repository.

Links and References

Discussion