Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea instance via its API to retrieve the editor configuration file for a specific repository. It is useful when you want to programmatically access the .editorconfig or any other configuration file stored in a repository to enforce consistent coding styles or settings across projects.

Typical use cases include:

  • Automatically fetching and applying editor configurations in CI/CD pipelines.
  • Auditing or validating repository configuration files.
  • Integrating repository settings into developer tools or dashboards.

Properties

Name Meaning
Owner The owner (user or organization) of the repository.
Repo The name of the repository from which to fetch the file.
Filepath The path to the file within the repository to retrieve (e.g., .editorconfig).
Ref The commit SHA, branch name, or tag to specify the version of the file. Defaults to default branch if not set.

Output

The node outputs JSON data representing the contents of the requested file at the specified reference in the repository. The output will typically include the raw content of the file as text.

If the file contains binary data, the node would handle it accordingly, but since this operation targets editor config files (usually text), the output is expected to be textual JSON content.

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 configured in n8n.
  • No additional external dependencies beyond the Gitea API and the included OpenAPI client.

Troubleshooting

  • File Not Found: If the specified filepath does not exist in the repo or at the given ref, the node may return an error or empty response. Verify the filepath and ref are correct.
  • Authentication Errors: Ensure the API key credential has sufficient permissions to read repository contents.
  • Invalid Ref: If the ref (branch/tag/commit) does not exist, the request will fail. Use valid references.
  • Network Issues: Connectivity problems with the Gitea server will cause failures; check network and server status.

Links and References

Discussion