Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to add one or more labels to a specific issue in a repository hosted on a Gitea instance. It is useful for organizing and categorizing issues by tagging them with relevant labels, which helps in issue tracking, filtering, and prioritization.

Practical examples include:

  • Automatically tagging new bug reports with a "bug" label.
  • Adding priority labels like "high priority" or "low priority" based on certain conditions.
  • Grouping issues by feature area or team responsibility using custom labels.

Properties

Name Meaning
Owner The username or organization name that owns the repository where the issue exists.
Repo The name of the repository containing the issue to which labels will be added.
Index The numeric index (ID) of the issue within the repository to identify which issue to label.
Labels A JSON array representing the labels to add. Can be either a list of label IDs (integers) or label names (strings).

Output

The node outputs JSON data representing the updated issue after the labels have been added. This typically includes the issue details such as its ID, title, current labels, state, and other metadata returned by the Gitea API.

If the node supports binary data output, it is not applicable here since this operation deals only with JSON data related to issues and labels.

Dependencies

  • Requires an active connection to a Gitea instance via an API key credential.
  • The node expects the base URL of the Gitea server and authentication credentials to be configured in n8n.
  • The Gitea API must be accessible and the authenticated user must have permission to modify issues in the specified repository.

Troubleshooting

  • Common Issues:

    • Incorrect owner or repo name can cause "Not Found" errors.
    • Providing an invalid issue index may result in errors indicating the issue does not exist.
    • Labels must be valid label names or IDs existing in the repository; otherwise, the API may reject the request.
    • Malformed JSON in the Labels property can cause parsing errors.
  • Error Messages:

    • 404 Not Found: Check if the owner, repo, and issue index are correct.
    • 401 Unauthorized: Verify that the API key credential is valid and has sufficient permissions.
    • 400 Bad Request: Ensure the labels JSON is correctly formatted and contains valid label identifiers.

Links and References

Discussion