Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with the Admin resource of a Gitea instance to add badges to a specified user. It is useful in scenarios where administrators want to assign recognition or status badges to users programmatically via the API, such as awarding contributors, marking moderators, or highlighting special roles.

For example, an admin can use this node to add multiple badges like "badge1" and "badge2" to a user identified by their username, automating user management tasks related to badge assignments.

Properties

Name Meaning
Username The username of the user to whom badges will be added.
Badge Slugs A JSON array of badge identifiers (slugs) representing the badges to assign to the user.

Output

The node outputs JSON data reflecting the result of the badge assignment operation. This typically includes confirmation of the badges added or details about the updated user badges. There is no indication that binary data is output by this node.

Dependencies

  • Requires connection to a Gitea instance with administrative API access.
  • Needs an API key or token credential configured in n8n for authenticating requests to the Gitea API.
  • The base URL of the Gitea server must be provided in the credentials configuration.

Troubleshooting

  • Invalid Username: If the username does not exist, the API will likely return an error indicating the user was not found. Verify the username spelling and existence.
  • Invalid Badge Slugs: Providing badge slugs that do not exist or are malformed JSON may cause errors. Ensure the badge slugs are valid and correctly formatted JSON arrays.
  • Authentication Errors: Missing or incorrect API credentials will prevent successful requests. Confirm that the API key/token is valid and has sufficient permissions.
  • API Endpoint Issues: If the Gitea server URL is incorrect or unreachable, the node will fail to connect. Check network connectivity and URL correctness.

Links and References

Discussion