Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows an administrator to delete specific badges from a user account. It is useful in scenarios where user achievements or recognitions (represented as badges) need to be revoked or corrected, such as removing mistakenly assigned badges or updating user status.

For example, if a user was incorrectly awarded certain badges or if badges are deprecated, this operation can remove those badges by specifying the username and the list of badge identifiers (slugs).

Properties

Name Meaning
Username The username of the user from whom badges will be deleted.
Badge Slugs A JSON array of badge slugs (identifiers) representing the badges to be removed. Example: ["badge1", "badge2"]

Output

The node outputs JSON data reflecting the result of the badge deletion operation. This typically includes confirmation of which badges were successfully removed or any error messages related to the operation. There is no indication that binary data is output by this node.

Dependencies

  • Requires an API key credential for authenticating with the Gitea API.
  • The node interacts with the Gitea API endpoint at /api/v1.
  • Proper configuration of the base URL and authentication credentials in n8n is necessary.

Troubleshooting

  • Invalid Username: If the specified username does not exist, the API may return an error indicating the user was not found. Verify the username spelling and existence.
  • Badge Slugs Format: The badge slugs must be provided as a valid JSON array. Malformed JSON or incorrect data types will cause errors. Ensure the input is correctly formatted.
  • Authentication Errors: Missing or invalid API credentials will prevent the operation from succeeding. Confirm that the API key and base URL are correctly configured.
  • Permission Issues: The authenticated user must have administrative privileges to delete badges. Lack of permissions will result in authorization errors.

Links and References

Discussion