Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation updates a repository variable in a Gitea repository. It allows users to modify the name and value of an existing variable associated with a specific repository owned by a user or organization. This is useful for managing configuration or environment variables stored at the repository level, enabling dynamic updates without manual intervention on the Gitea platform.

Practical examples include:

  • Changing API keys or tokens stored as repository variables when they are rotated.
  • Updating environment-specific settings used in CI/CD pipelines.
  • Renaming variables to reflect new naming conventions or purposes.

Properties

Name Meaning
Owner The username or organization name that owns the repository.
Repo The name of the repository where the variable exists.
Variablename The current name of the variable to update.
Name New name for the variable. If left empty, the variable's name will not be changed.
Value The new value to assign to the variable.

Output

The node outputs JSON data representing the updated repository variable after the operation completes successfully. This typically includes fields such as the variable's name, value, and possibly metadata like creation or update timestamps.

If the node supports binary data output (not indicated here), it would represent any file or binary content related to the variable update, but this operation primarily deals with JSON data.

Dependencies

  • Requires an API key credential for authenticating with the Gitea instance.
  • Needs the base URL of the Gitea server configured in the credentials.
  • Depends on the Gitea REST API endpoint for repository variables.

Troubleshooting

  • Common issues:

    • Incorrect owner or repository names leading to "Not Found" errors.
    • Insufficient permissions or invalid API credentials causing authorization failures.
    • Attempting to rename a variable to a name that already exists may cause conflicts.
    • Empty required fields resulting in validation errors.
  • Error messages and resolutions:

    • 404 Not Found: Verify the owner and repository names are correct and accessible.
    • 401 Unauthorized: Check that the API key credential is valid and has necessary scopes.
    • 400 Bad Request: Ensure all required properties are provided and correctly formatted.
    • Conflict errors: Avoid renaming variables to existing variable names within the same repository.

Links and References

Discussion