Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea instance to retrieve a specific pull request from a repository by specifying the base and head branches. It is useful when you want to programmatically fetch details of a pull request that compares changes between two branches in a repository hosted on Gitea.

Practical examples include:

  • Automating workflows that need to check the status or details of a pull request before proceeding.
  • Integrating Gitea pull request data into other systems or dashboards.
  • Triggering actions based on the existence or state of a pull request between specified branches.

Properties

Name Meaning
Owner The owner (user or organization) of the repository.
Repo The name of the repository where the pull request exists.
Base The base branch of the pull request (the branch you want to merge into).
Head The head branch of the pull request (the branch containing your changes).

Output

The node outputs JSON data representing the pull request found by matching the given base and head branches. This includes all standard pull request information such as title, description, author, status, timestamps, and other metadata provided by the Gitea API.

If no pull request matches the criteria, the output will typically be empty or indicate no results found.

No binary data output is involved.

Dependencies

  • Requires access to a Gitea instance with an API endpoint.
  • Needs an API authentication token credential configured in n8n to authorize requests against the Gitea API.
  • The node uses the Gitea REST API v1 under the hood.

Troubleshooting

  • Common issues:

    • Incorrect owner or repo names can lead to "not found" errors.
    • Invalid or missing API credentials will cause authentication failures.
    • Specifying base or head branches that do not exist or have no pull requests will result in empty responses.
  • Error messages:

    • Authentication errors: Ensure the API token is valid and has sufficient permissions.
    • Not found errors: Verify the repository owner, repo name, and branch names are correct.
    • Network errors: Check connectivity to the Gitea server and that the URL is correctly configured.

Links and References

Discussion