Forgejo icon

Forgejo

Interact with Forgejo API

Overview

This node operation creates a new pull request in a specified repository on Forgejo. It is useful for automating the process of proposing code changes from one branch to another within a repository. For example, developers can use this node to programmatically open pull requests for feature branches to be merged into the main branch, facilitating continuous integration and collaboration workflows.

Use Case Examples

  1. Create a pull request from a feature branch 'feature-xyz' to the 'main' branch with a descriptive title and optional body text.
  2. Assign specific users to review the pull request by providing their usernames as assignees.

Properties

Name Meaning
Owner The username or organization name that owns the repository where the pull request will be created.
Repository The name of the repository where the pull request will be created.
Title The title of the pull request, summarizing the changes or purpose.
Body Optional detailed description or body text for the pull request.
Assignees Comma-separated list of usernames to assign as reviewers or responsible parties for the pull request.
Head Branch The name of the branch containing the changes to be merged (source branch).
Base Branch The name of the branch into which the changes will be merged (target branch).

Output

JSON

  • json - The JSON response from the Forgejo API representing the created pull request details.

Dependencies

  • Requires an API key credential for Forgejo API authentication.

Troubleshooting

  • Ensure that the 'owner', 'repository', 'head', and 'base' branch names are correctly specified and exist in the repository.
  • Verify that the API credentials have sufficient permissions to create pull requests in the target repository.
  • Common errors include authentication failures, invalid branch names, or insufficient permissions. Check the error message returned in the node output for details.

Links

Discussion