Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea server via its API to retrieve branch protection details for a specific repository branch. It is useful when you want to programmatically check the protection settings applied to a branch, such as required status checks or restrictions on who can push to the branch. For example, a DevOps engineer might use this node in an automation workflow to verify branch protection before merging code or triggering deployments.

Properties

Name Meaning
Owner The owner (user or organization) of the repository.
Repo The name of the repository.
Name The name of the protected branch to get information about.

Output

The node outputs JSON data representing the branch protection configuration of the specified branch. This typically includes details such as required status checks, required approvals, and any restrictions on pushing or merging. The exact structure depends on the Gitea API response for branch protection.

No binary data output is produced by this node.

Dependencies

  • Requires access to a Gitea instance with API enabled.
  • Needs an API authentication token credential configured in n8n to authorize requests.
  • The base URL for the Gitea API must be set in the credentials.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Specifying a non-existent repository, owner, or branch name will result in errors from the API.
    • Network connectivity problems to the Gitea server will prevent successful API calls.
  • Error messages:

    • Authentication errors usually indicate invalid or missing API tokens; ensure credentials are correctly configured.
    • "Not Found" errors suggest the owner, repo, or branch does not exist or the user lacks permission.
    • Timeout or connection errors imply network issues or incorrect API URL.

Links and References

Discussion