Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea instance to create pull request review requests on a specified repository. It allows users to assign individual reviewers and teams to review a particular pull request by its index within the repository.

Common scenarios include:

  • Automating code review assignments after creating or updating pull requests.
  • Integrating with CI/CD pipelines to ensure specific team members or teams review changes before merging.
  • Managing review workflows programmatically for repositories hosted on a Gitea server.

Practical example:

  • After a developer pushes a feature branch and opens a pull request, this node can be used to automatically request reviews from designated team members or teams to streamline the review process.

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 zero-based index identifying which pull request to target for adding review requests.
Reviewers A JSON array specifying individual usernames to request as reviewers on the pull request.
Team Reviewers A JSON array specifying team names to request as reviewers on the pull request.

Output

The node outputs JSON data representing the response from the Gitea API after attempting to create the pull request review requests. This typically includes details about the updated pull request review state or confirmation of the requested reviewers.

No binary data output is involved.

Dependencies

  • Requires access to a Gitea instance with API enabled.
  • 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

  • Invalid Owner or Repo: If the owner or repository name is incorrect, the API will return an error indicating the resource was not found. Verify spelling and case sensitivity.
  • Invalid Pull Request Index: Using an index that does not correspond to an existing pull request will cause errors. Ensure the index matches an open pull request.
  • Malformed Reviewers JSON: The Reviewers and Team Reviewers fields expect valid JSON arrays. Invalid JSON syntax will cause parsing errors. Use proper JSON formatting.
  • Insufficient Permissions: The API token must have permission to request reviews on the repository. Lack of permissions will result in authorization errors.
  • Network or URL Issues: Incorrect Gitea server URL or network connectivity problems will prevent API calls. Confirm the URL and network access.

Links and References

Discussion