Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to create a new tag in a specified repository on a Gitea server via its API. Tagging is useful for marking specific points in the repository’s history, such as releases or important milestones. This operation is beneficial when automating release workflows, versioning codebases, or managing repository states programmatically.

For example, you can use this node to automatically create a tag named "v1.0.0" with an optional message and target commit SHA after a successful build or deployment process.

Properties

Name Meaning
Owner The username or organization name that owns the repository where the tag will be created.
Repo The name of the repository in which to create the tag.
Message An optional message describing the tag (e.g., release notes or description).
Tag Name The name of the tag to create (e.g., "v1.0.0").
Target The commit SHA or branch name that the tag should point to. If empty, defaults to HEAD.

Output

The node outputs JSON data representing the newly created tag object returned by the Gitea API. This typically includes details such as the tag name, target commit, message, and other metadata about the tag.

No binary data output is produced by this operation.

Dependencies

  • Requires a configured API authentication credential for Gitea.
  • Needs the base URL of the Gitea instance set in the credentials.
  • Relies on the Gitea REST API endpoint /repos/{owner}/{repo}/git/tags or equivalent for creating tags.

Troubleshooting

  • Common issues:
    • Invalid or missing owner/repo names will cause the API call to fail.
    • Insufficient permissions or invalid API credentials will result in authorization errors.
    • Providing a non-existent target commit SHA or branch name will cause the tag creation to fail.
  • Error messages:
    • 404 Not Found: Check if the repository exists and the owner/repo names are correct.
    • 401 Unauthorized or 403 Forbidden: Verify API credentials and permissions.
    • 422 Unprocessable Entity: Usually indicates invalid input, such as malformed tag name or target.

Resolving these usually involves verifying input parameters, ensuring proper API credentials, and confirming the target commit or branch exists.

Links and References

Discussion