Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea instance to perform repository-related operations. Specifically, the "Repo Merge Upstream" operation merges changes from an upstream branch into a specified branch of a repository. This is useful for synchronizing a forked repository with its original source or keeping a feature branch up to date with the main development branch.

Practical examples include:

  • Automatically merging updates from the main branch into a development branch.
  • Keeping a forked repository synchronized with the original repository's latest changes.
  • Integrating upstream fixes or features into your working branch without manual git commands.

Properties

Name Meaning
Owner The owner (user or organization) of the repository.
Repo The name of the repository where the merge will be performed.
Branch The target branch in the repository into which the upstream changes will be merged.

Output

The node outputs JSON data representing the result of the merge operation. This typically includes details about the merge commit, status of the merge, and any relevant metadata returned by the Gitea API. There is no indication that binary data is output by this node.

Dependencies

  • Requires access 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.
  • Uses the @devlikeapro/n8n-openapi-node package and an OpenAPI specification (openapi.json) bundled with the node for request building.

Troubleshooting

  • Authentication errors: Ensure the API key/token is valid and has sufficient permissions to perform repository merges.
  • Repository not found: Verify that the owner and repo names are correct and accessible by the authenticated user.
  • Branch does not exist: Confirm that the specified branch exists in the repository.
  • Merge conflicts: If the upstream changes cannot be merged automatically, the API may return an error indicating conflicts; manual resolution might be required.
  • Network issues: Check connectivity to the Gitea server and that the base URL is correctly set.

Links and References

Discussion