Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea repository to update a specific pull request. It allows users to select a pull request by its index and then update it using either a merge or rebase strategy. This is useful in scenarios where automated workflows need to programmatically finalize or synchronize pull requests, such as continuous integration pipelines or automated code review processes.

Practical examples include:

  • Automatically merging approved pull requests after successful tests.
  • Rebasing pull requests to keep them up-to-date with the base branch before merging.

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 zero-based index of the pull request to update (e.g., 0 for the first pull request).
Style The method to update the pull request: either "Merge" to merge the PR or "Rebase" to rebase it.

Output

The node outputs JSON data representing the updated pull request after applying the selected update style. This typically includes details such as the pull request status, merge commit information, and any relevant metadata returned by the Gitea API.

No binary data output is indicated.

Dependencies

  • Requires an API key credential for authenticating with the Gitea instance.
  • Needs the base URL of the Gitea server configured in credentials.
  • Depends on the Gitea REST API v1 endpoints to perform pull request updates.

Troubleshooting

  • Common issues:

    • Incorrect repository owner or name may cause "not found" errors.
    • Specifying an invalid pull request index could result in out-of-range errors.
    • Insufficient permissions or invalid API credentials will lead to authentication failures.
    • Network connectivity problems to the Gitea server can cause request timeouts.
  • Error messages and resolutions:

    • "Pull request not found": Verify the owner, repo, and index values are correct.
    • "Unauthorized" or "Forbidden": Check that the API key has sufficient permissions.
    • "Invalid update style": Ensure the style property is set to either "merge" or "rebase".
    • Timeouts or connection errors: Confirm network access to the Gitea server and correct URL configuration.

Links and References

Discussion