GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation performs a cherry-pick of a commit in a GitLab project repository. It is useful for selectively applying changes from one commit to another branch without merging the entire branch. For example, developers can use this to apply bug fixes or features from a specific commit to a release branch.

Use Case Examples

  1. Cherry-pick a commit identified by its SHA from the main branch to a feature branch in a GitLab project.
  2. Apply a specific commit from a tag to another branch to backport changes.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically an API key credential.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, default is POST for this operation.
Path Parameters Parameters in the request path identifying the project and commit to cherry-pick.

Output

JSON

  • id - The ID of the cherry-picked commit.
  • short_id - The short SHA identifier of the commit.
  • title - The title or message of the commit.
  • author_name - The name of the commit author.
  • author_email - The email of the commit author.
  • created_at - The timestamp when the commit was created.
  • message - The full commit message.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID and commit SHA are correct and accessible with the provided authentication.
  • Verify that the user has permission to perform cherry-pick operations on the repository.
  • Check that the base URL is correctly set if using a self-hosted GitLab instance.
  • Common errors include 404 Not Found if the project or commit does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion