Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with the Gitea API to delete a specific Git hook from a repository. It is useful in scenarios where you need to programmatically manage repository hooks, such as removing outdated or unnecessary hooks that trigger automated workflows or integrations.

For example, if a repository has a webhook configured to notify a CI/CD system on push events but that integration is no longer needed, this node can be used to delete that webhook by specifying its ID.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where the hook exists.
Repo The name of the repository from which the Git hook will be deleted.
Id The unique identifier of the Git hook to delete.

Output

The node outputs JSON data representing the response from the Gitea API after attempting to delete the specified Git hook. Typically, for a delete operation, the output may be an empty object or confirmation of deletion. No binary data is produced.

Dependencies

  • Requires an API key credential for authenticating with the Gitea instance.
  • The node expects the base URL of the Gitea server to be configured in the credentials.
  • Uses the Gitea REST API endpoint /api/v1 to perform operations.

Troubleshooting

  • Invalid Owner/Repo/Id: If any of these properties are incorrect or do not correspond to an existing hook, the API will return an error indicating the resource was not found.
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures.
  • Permission Issues: The authenticated user must have sufficient permissions to delete hooks in the target repository.
  • Network Issues: Connectivity problems to the Gitea server will result in request failures.

To resolve errors:

  • Verify the correctness of the owner, repo, and hook ID values.
  • Ensure the API key credential is valid and has appropriate access rights.
  • Check network connectivity and the Gitea server status.

Links and References

Discussion