Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea server via its API, specifically allowing users to delete a branch from a repository. It is useful in scenarios where you want to automate repository maintenance tasks such as cleaning up stale or unwanted branches programmatically. For example, after merging a feature branch, you might want to automatically delete it to keep the repository tidy.

Properties

Name Meaning
Owner The owner of the repository (user or organization name).
Repo The name of the repository from which the branch will be deleted.
Branch The name of the branch to delete.

Output

The node outputs JSON data representing the response from the Gitea API after attempting to delete the specified branch. Typically, this would confirm whether the deletion was successful or provide error details if it failed. There is no indication that binary data is output by this node.

Dependencies

  • Requires an active connection to a Gitea instance.
  • Needs an API authentication token configured in n8n credentials to authorize requests to the Gitea API.
  • The base URL for the Gitea API must be set in the credentials configuration.

Troubleshooting

  • Common issues:
    • Incorrect owner, repo, or branch names can cause the API call to fail.
    • Insufficient permissions on the API token may prevent branch deletion.
    • Network connectivity problems to the Gitea server.
  • Error messages:
    • "Branch not found" indicates the specified branch does not exist.
    • "Unauthorized" or "Forbidden" errors suggest missing or invalid API credentials or insufficient permissions.
  • Resolutions:
    • Verify the spelling and case sensitivity of owner, repo, and branch inputs.
    • Ensure the API token has the necessary scopes/permissions to delete branches.
    • Check network access and the correctness of the Gitea server URL.

Links and References

Discussion