Gitea icon

Gitea

Interact with Gitea via API

Actions393

Repository → Repo Get Languages

AI-generated

Overview

This node interacts with a Gitea instance via its API to retrieve information about repositories. Specifically, the "Repo Get Languages" operation fetches the programming languages used in a specified repository. This is useful for developers or teams who want to analyze the language composition of their projects, generate reports, or automate workflows based on repository language data.

Practical examples include:

  • Automatically tagging repositories by their primary languages.
  • Generating dashboards showing language distribution across multiple repos.
  • Triggering specific CI/CD pipelines depending on the languages detected.

Properties

Name Meaning
Owner The username or organization name that owns the repository.
Repo The name of the repository from which to get language data.

Output

The node outputs JSON data containing the languages used in the specified repository. Typically, this will be an object where keys are language names and values represent metrics such as the number of bytes of code written in each language.

Example output structure (simplified):

{
  "JavaScript": 123456,
  "Python": 78910,
  "HTML": 111213
}

This output allows downstream nodes or workflows to process language statistics programmatically.

Dependencies

  • Requires access to a Gitea instance with API enabled.
  • Needs an API authentication token configured in the node credentials to authorize requests.
  • The base URL of the Gitea server must be provided in the credentials configuration.

Troubleshooting

  • Authentication errors: Ensure the API token is valid and has sufficient permissions to read repository data.
  • Repository not found: Verify that the owner and repo names are correct and that the repository exists on the Gitea instance.
  • Network issues: Confirm that the Gitea server URL is reachable from the n8n environment.
  • Empty or missing language data: Some repositories might not have detectable languages if they are empty or contain unsupported file types.

Links and References

Discussion