GitLab API

GitlabTool

Actions1000

Overview

This node operation performs a cherry-pick of a commit in a GitLab project repository. It allows users to specify a project by its ID or URL-encoded path and a commit SHA (or branch/tag name) to cherry-pick. This is useful for selectively applying changes from one commit to another branch without merging entire branches. For example, a developer can use this node to apply a bug fix commit from the main branch to a release branch.

Use Case Examples

  1. Cherry-pick a commit with SHA 'abc123' from project with ID '42' to another branch.
  2. Apply a specific commit from a feature branch to the main branch by specifying the commit SHA and project ID.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request (boolean). Defaults to false.
Authentication The authentication method used for the API request, hidden unless Skip Authentication is false. Defaults to GitLab API key.
baseUrl The base URL of the GitLab instance. Defaults to https://gitlab.com.
Method The HTTP method to use for the request. Defaults to GET, but POST is used for this operation.
Path Parameters Parameters for the request path, including the project ID or URL-encoded path ('id') and the commit SHA or branch/tag name ('sha').

Output

JSON

  • id - The ID of the cherry-picked commit.
  • short_id - The short SHA identifier of the cherry-picked commit.
  • title - The title of the cherry-picked commit.
  • author_name - The name of the author of the commit.
  • author_email - The email of the author of the commit.
  • created_at - The timestamp when the commit was created.
  • message - The 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

Troubleshooting

  • Ensure the project ID or URL-encoded path ('id') and commit SHA ('sha') are correctly specified; incorrect values will cause the API call to fail.
  • Authentication errors may occur if the GitLab API key is missing or invalid; verify the API key credentials.
  • The cherry-pick operation may fail if the commit cannot be applied cleanly; check for conflicts or errors in the GitLab UI or API response.

Links

Discussion