Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to create a pull request in a specified repository on Gitea, a self-hosted Git service. It is useful for automating the process of opening pull requests as part of CI/CD pipelines, code review workflows, or integration with other tools. For example, after pushing feature branches, this node can automatically open pull requests targeting the main branch, assign reviewers, and add labels or milestones.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where the pull request will be created.
Repo The name of the repository where the pull request will be created.
Assignee A single user to assign the pull request to.
Assignees A JSON array of users to assign the pull request to.
Base The branch you want the changes pulled into (the target branch).
Body The description or body text of the pull request.
Due Date The due date for the pull request (if supported by the API).
Head The branch where your changes are implemented (the source branch).
Labels A JSON array of labels to associate with the pull request.
Milestone The milestone number to associate with the pull request.
Reviewers A JSON array of users requested to review the pull request.
Team Reviewers A JSON array of teams requested to review the pull request.
Title The title of the pull request.

Output

The node outputs JSON data representing the created pull request object returned from the Gitea API. This typically includes details such as the pull request ID, URL, state, title, description, assignees, reviewers, labels, and timestamps. There is no binary output.

Dependencies

  • Requires an API key credential for authenticating with the Gitea instance.
  • The node expects the base URL of the Gitea server to be configured in the credentials.
  • Uses the Gitea REST API v1 endpoints under /api/v1.

Troubleshooting

  • Authentication errors: Ensure the API key credential is valid and has sufficient permissions to create pull requests.
  • Invalid repository or owner: Verify that the owner and repo names are correct and accessible by the authenticated user.
  • Branch not found: The head and base branches must exist in the repository; otherwise, the API will return an error.
  • Malformed JSON inputs: Properties like assignees, labels, reviewers, and team_reviewers expect valid JSON arrays; invalid JSON will cause failures.
  • Missing required fields: owner, repo, title, head, and base are essential for creating a pull request; omitting them will result in errors.

Links and References

Discussion