Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to create a new label for an issue in a repository hosted on a Gitea instance. Labels are useful for categorizing and organizing issues, making it easier to filter and manage them. This operation is beneficial when automating issue tracking workflows, such as automatically tagging issues based on certain criteria or integrating with other tools that generate issues.

Practical examples:

  • Automatically creating labels like "bug", "enhancement", or "urgent" when new issues are created.
  • Adding color-coded labels to issues to visually distinguish their priority or type.
  • Archiving or marking labels as exclusive to control how they are used within the repository.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where the label will be created.
Repo The name of the repository where the label will be created.
Color The color code of the label in hexadecimal format (e.g., #00aabb).
Description Optional description text for the label.
Exclusive Boolean flag indicating if the label is exclusive (true or false).
Is Archived Boolean flag indicating if the label should be archived (true or false).
Name The name of the label to create.

Output

The output JSON contains the details of the newly created label as returned by the Gitea API. This typically includes fields such as the label's ID, name, color, description, exclusivity status, and archival status.

If the node supports binary data output, it is not indicated here; thus, the output is purely JSON-based representing the label object.

Dependencies

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

Troubleshooting

  • Common Issues:
    • Invalid or missing repository owner or name can cause errors.
    • Incorrect or missing API authentication will result in authorization failures.
    • Providing an invalid color code format may cause the API to reject the request.
  • Error Messages:
    • Authorization errors usually indicate problems with the API key or permissions.
    • Validation errors from the API may indicate missing required fields like name or color.
  • Resolutions:
    • Verify that the API token has sufficient permissions to create labels.
    • Double-check the repository owner and name spelling.
    • Ensure the color value is a valid hex color string starting with #.

Links and References

Discussion