Forgejo icon

Forgejo

Interact with Forgejo API

Overview

This node operation merges a pull request in a Forgejo repository. It allows users to specify the repository owner, repository name, pull request number, and the merge method (merge, rebase, or squash). This operation is useful for automating the process of merging pull requests in a continuous integration or deployment workflow, ensuring that code changes are integrated efficiently and consistently.

Use Case Examples

  1. Automatically merge a pull request after successful tests.
  2. Merge a feature branch pull request into the main branch using squash merge to keep a clean commit history.

Properties

Name Meaning
Owner The username or organization that owns the repository where the pull request exists.
Repository The name of the repository containing the pull request to merge.
Pull Request Number The unique number identifying the pull request to be merged.
Merge Method The method to use for merging the pull request. Options include 'merge' (default merge commit), 'rebase' (rebase the commits), and 'squash' (combine all commits into one).

Output

JSON

  • json - The JSON response from the Forgejo API representing the result of the merge operation, including details about the merged pull request or success status.

Dependencies

  • Requires an API key credential for Forgejo API authentication.

Troubleshooting

  • Ensure the pull request number is correct and exists in the specified repository.
  • Verify that the API credentials have sufficient permissions to merge pull requests.
  • Check that the merge method is supported by the repository settings.
  • Common errors include authentication failures, permission denied, or invalid pull request number. Resolving these involves verifying credentials, permissions, and input parameters.

Links

  • Forgejo API Documentation - Official API documentation for Forgejo, detailing endpoints including pull request merge operations.

Discussion