GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation performs a cherry-pick of a commit in a GitLab project repository. It is useful for developers who want to apply the changes introduced by a specific commit (identified by its SHA or branch/tag name) onto another branch without merging the entire branch. For example, this can be used to selectively apply bug fixes or features from one branch to another.

Use Case Examples

  1. Cherry-pick a commit from a feature branch to the main branch to apply a bug fix without merging all feature branch changes.
  2. Apply a specific commit from a release branch to a hotfix branch to quickly patch production issues.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters for the API path including the project ID or URL-encoded path and the commit SHA or branch/tag name 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 of the commit message.
  • 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.
  • committed_date - The date when the commit was committed.
  • authored_date - The date when the commit was authored.
  • parent_ids - The parent commit IDs of the cherry-picked commit.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and commit SHA or branch/tag name are correct and URL-encoded if necessary.
  • Verify that the API key credential has sufficient permissions to perform cherry-pick operations on the repository.
  • Check the base URL is correctly set to the GitLab instance being accessed.
  • Common error messages include authentication failures, invalid project or commit identifiers, and permission denied errors. Resolving these typically involves correcting credentials, parameters, or access rights.

Links

Discussion