Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to edit an existing label on an issue within a repository hosted on a Gitea instance. It is useful for managing issue labels dynamically, such as updating the label's color, description, exclusivity, archival status, or name. This can help maintain organized and up-to-date labeling of issues in your project management workflow.

Practical examples include:

  • Changing the color of a label to reflect priority changes.
  • Updating the description to clarify the label’s purpose.
  • Archiving outdated labels without deleting them.
  • Renaming labels to better match evolving project terminology.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where the label exists.
Repo The name of the repository containing the label to be edited.
Id The unique identifier of the label to edit.
Color The new color code for the label, typically a hex color string (e.g., #00aabb).
Description A new 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 new name for the label.

Output

The node outputs JSON data representing the updated label object after the edit operation. This includes all label properties such as id, name, color, description, exclusivity, and archival status reflecting the changes made.

No binary data output is involved in this operation.

Dependencies

  • Requires 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 configuration.

Troubleshooting

  • Common Issues:

    • Invalid or missing repository owner or repo name will cause the request to fail.
    • Providing an incorrect label ID that does not exist will result in an error.
    • Insufficient permissions or invalid API token will lead to authorization errors.
    • Incorrect color format may be rejected by the API.
  • Error Messages:

    • 404 Not Found: Label ID or repository not found. Verify the owner, repo, and label ID.
    • 401 Unauthorized: Authentication failed. Check API token validity and permissions.
    • 400 Bad Request: Invalid input data, such as malformed color code or invalid field values.

Resolving these usually involves verifying input parameters, ensuring correct API credentials, and confirming the label exists before editing.

Links and References

Discussion