Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows users to create a pull request review on a repository hosted in Gitea. It is useful for automating code review workflows by programmatically submitting reviews, comments, and specifying the review state (such as approval or request changes) on pull requests.

Typical use cases include:

  • Automatically adding a review comment after running automated tests.
  • Programmatically approving or requesting changes on a pull request based on custom logic.
  • Integrating with CI/CD pipelines to enforce review policies.

Properties

Name Meaning
Owner The owner of the repository where the pull request exists.
Repo The name of the repository containing the pull request.
Index The index (number) identifying the specific pull request to review.
Body The main text content of the review.
Comments A JSON array of comments to add to the review, allowing multiple inline comments.
Commit Id The SHA identifier of the commit that the review targets.
Event The review state type indicating the action on the pull request (e.g., approve, comment).

Output

The node outputs JSON data representing the created pull request review response from the Gitea API. This typically includes details such as the review ID, state, body, comments, author information, and timestamps.

No binary data output is involved in this operation.

Dependencies

  • Requires an active 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

  • Invalid repository or owner: Ensure the "Owner" and "Repo" fields are correctly specified and that the authenticated user has access rights.
  • Pull request index not found: Verify the pull request number exists in the specified repository.
  • Authentication errors: Confirm the API token is valid and has sufficient permissions to create pull request reviews.
  • Malformed comments JSON: The "Comments" property expects valid JSON; invalid formatting will cause errors.
  • Missing required fields: All required properties (Owner, Repo, Index) must be provided to avoid validation errors.

Links and References

Discussion