Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Git repository hosted on a Gitea server to retrieve detailed information about a single commit identified by its SHA or git reference. It is useful when you want to programmatically fetch commit metadata, including stats, verification details, and affected files, for auditing, reporting, or integration purposes.

Practical examples include:

  • Fetching commit details to display in a custom dashboard.
  • Automating release notes generation by extracting commit info.
  • Validating commit signatures or verifying changes before deployment.

Properties

Name Meaning
Owner The owner (user or organization) of the repository.
Repo The name of the repository from which to get the commit.
Sha The git reference or commit SHA identifying the specific commit to retrieve.
Stat Whether to include diff statistics (additions, deletions, total changes) for the commit. Default is true.
Verification Whether to include verification information (e.g., signature verification) for the commit. Default is true.
Files Whether to include a list of files affected by the commit. Default is true.

Output

The node outputs JSON data representing the commit details as returned by the Gitea API. This includes:

  • Commit metadata such as author, committer, message, date.
  • Diff statistics if enabled (number of additions, deletions, total changes).
  • Verification status of the commit signature if enabled.
  • List of files changed in the commit if enabled.

No binary data output is produced by this node.

Dependencies

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

Troubleshooting

  • Common issues:
    • Invalid or missing repository owner/name or commit SHA will cause errors.
    • Network connectivity problems to the Gitea server.
    • Insufficient permissions or invalid API token leading to authorization failures.
  • Error messages:
    • "Not Found" indicates the specified commit or repository does not exist or is inaccessible.
    • "Unauthorized" or "Forbidden" suggests API credentials are missing or lack required scopes.
  • Resolutions:
    • Verify that the owner, repo, and SHA values are correct.
    • Check network access to the Gitea server.
    • Ensure the API token has appropriate permissions to read repository data.

Links and References

Discussion