Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Git repository hosted on a Gitea server to download the diff or patch of a specific commit. It is useful when you want to programmatically retrieve the changes introduced by a particular commit in a repository, for example, to analyze code changes, generate reports, or trigger further automation based on commit content.

Typical use cases include:

  • Fetching the diff or patch of a commit to review changes without cloning the entire repository.
  • Integrating with CI/CD pipelines to extract commit changes for validation or deployment steps.
  • Automating code audit or compliance checks by analyzing commit diffs.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where the commit exists.
Repo The name of the repository containing the commit.
Sha The SHA hash identifier of the commit to retrieve the diff or patch for.
Diff Type Specifies whether to output the commit changes as a "diff" or a "patch". Options: Diff, Patch

Output

The node outputs JSON data containing the raw textual representation of the commit's changes either as a diff or patch format, depending on the selected option. This output can be used downstream for display, storage, or further processing.

If binary data were involved (e.g., file contents), it would be indicated here, but this node focuses on textual diff/patch data only.

Dependencies

  • Requires access to a Gitea instance via its API.
  • Needs an API authentication token credential configured in n8n to authorize requests to the Gitea server.
  • The base URL of the Gitea server must be set in the credentials configuration.

Troubleshooting

  • Invalid SHA: If the provided commit SHA does not exist, the node will likely return an error indicating the commit was not found. Verify the SHA value and repository details.
  • Authentication errors: Ensure that the API key/token credential is valid and has sufficient permissions to access the repository.
  • Network issues: Connectivity problems to the Gitea server will cause request failures. Check network settings and server availability.
  • Incorrect repository or owner: Double-check the spelling and case sensitivity of the owner and repo names.

Links and References

Discussion