Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to list pull requests from a specific repository in Gitea, a self-hosted Git service. It is useful for automating workflows that need to monitor or process pull requests, such as triggering CI/CD pipelines, generating reports, or managing code reviews.

For example, you can use this node to:

  • Retrieve all open pull requests for a repository to notify a team.
  • Filter pull requests by state (open, closed, all) and sort them by update time or comment count.
  • Paginate through large numbers of pull requests to process them in batches.

Properties

Name Meaning
Owner Owner of the repository (username or organization name).
Repo Name of the repository.
State State of pull requests to list: open, closed, or all.
Sort Sorting method for results: oldest, recentupdate, leastupdate, mostcomment, leastcomment, or priority.
Milestone ID of the milestone to filter pull requests by.
Labels JSON array of label IDs to filter pull requests by labels.
Poster Username of the pull request author to filter by.
Page Page number of results to return (1-based pagination).
Limit Number of results per page (page size).

Output

The node outputs an array of pull request objects in the json field. Each object represents a pull request with details such as its title, state, author, labels, milestone, comments count, and timestamps. This structured data can be used downstream in your workflow for further processing or notifications.

No binary data output is produced by this operation.

Dependencies

  • Requires connection to a Gitea instance via its 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 configuration.

Troubleshooting

  • Common issues:
    • Incorrect owner or repo names will result in errors or empty results.
    • Invalid or missing API credentials will cause authentication failures.
    • Pagination parameters (page and limit) set incorrectly may lead to unexpected result counts.
  • Error messages:
    • Authentication errors typically indicate invalid or missing API tokens; verify credentials.
    • "Not Found" errors usually mean the specified repository or resource does not exist; check spelling and access rights.
    • Rate limiting errors may occur if too many requests are made in a short time; consider adding delays or increasing limits.

Links and References

Discussion