Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea instance to edit tag protection settings on a specific repository. Tag protection is a feature that restricts who can push or modify tags in a repository, helping maintain the integrity of important tags such as release versions.

Typical use cases include:

  • Enforcing team policies by restricting tag modifications to certain users or teams.
  • Automating repository management workflows where tag protections need to be updated programmatically.
  • Integrating with CI/CD pipelines to dynamically adjust tag protections based on deployment stages.

For example, you might use this node to update the whitelist of users and teams allowed to modify protected tags after a new release cycle starts.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where the tag protection is edited.
Repo The name of the repository to edit tag protection for.
Id The identifier of the protected tag to be edited.
Name Pattern (Optional) A pattern to match tag names for protection.
Whitelist Teams (Optional) JSON array specifying teams allowed to bypass tag protection.
Whitelist Usernames (Optional) JSON array specifying usernames allowed to bypass tag protection.

Output

The node outputs JSON data representing the updated tag protection configuration returned from the Gitea API. This typically includes details such as the tag protection ID, name pattern, and the lists of whitelisted teams and users.

No binary data output is involved.

Dependencies

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

Troubleshooting

  • Invalid Repository or Owner: If the specified repository or owner does not exist, the API will return an error. Verify the spelling and access rights.
  • Invalid Tag Protection ID: Providing a non-existent tag protection ID will cause the update to fail. Ensure the ID corresponds to an existing protected tag.
  • Malformed JSON in Whitelist Fields: The whitelist teams and usernames fields expect valid JSON arrays. Incorrect formatting will cause parsing errors.
  • Authentication Errors: Missing or invalid API tokens will result in authorization failures. Confirm the API key is correctly configured.
  • API Endpoint Issues: Ensure the Gitea base URL is correct and reachable from the n8n environment.

Links and References

Discussion