Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a repository hosted on a Gitea server to download the diff or patch of a specific pull request. It is useful when you want to programmatically retrieve the changes introduced by a pull request for review, analysis, or applying patches in automated workflows.

Typical use cases include:

  • Automatically fetching pull request diffs for code review automation.
  • Integrating with CI/CD pipelines to analyze changes before deployment.
  • Downloading patch files to apply changes locally or in other systems.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where the pull request exists.
Repo The name of the repository containing the pull request.
Index The index (number) of the pull request to retrieve the diff or patch from.
Diff Type The format of the output: either "Diff" or "Patch".
Binary Whether to include binary file changes. If true, the diff/patch is compatible with git apply.

Output

The node outputs the content of the pull request's diff or patch as JSON data. This typically includes the textual representation of the changes made in the pull request, formatted either as a unified diff or patch file.

If the "Binary" option is enabled, the output will include binary file changes encoded appropriately so that the patch can be applied using standard git tools.

Dependencies

  • Requires connection to a Gitea instance via its API.
  • Needs an API authentication token configured in the node credentials to access the repository and pull request data.
  • The base URL of the Gitea server must be provided in the credentials configuration.

Troubleshooting

  • Invalid Owner or Repo: Ensure the owner and repository names are correct and accessible with the provided credentials.
  • Pull Request Index Not Found: Verify that the pull request number exists in the specified repository.
  • Authentication Errors: Check that the API key/token has sufficient permissions to read pull requests.
  • Binary Option Issues: If binary changes are included but the patch fails to apply, verify compatibility with your git version and patch application method.

Links and References

Discussion