GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node interacts with the GitLab API to create a new branch in a specified project repository. It is useful for automating branch creation workflows in GitLab projects, such as when setting up new features or hotfixes programmatically.

Use Case Examples

  1. Automatically create a new branch in a GitLab project when a new feature request is received.
  2. Create branches for different environments or stages in a CI/CD pipeline.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET but can be set to POST for branch creation.
Path Parameters Parameters included in the request path, specifically the project ID or URL-encoded path to identify the project repository where the branch will be created.

Output

JSON

  • id - The ID or URL-encoded path of the project where the branch is created.
  • branchName - The name of the newly created branch.
  • commitDetails - Details about the commit from which the branch was created.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID is correctly specified and URL-encoded if necessary.
  • Verify that the authentication credentials are valid and have sufficient permissions to create branches in the project.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.

Links

Discussion