GitLab API

GitlabTool

Actions905

Overview

This node operation reverts a specific commit in a GitLab project repository by calling the GitLab API endpoint for reverting commits. It is useful for automating the process of undoing changes introduced by a particular commit in a project, which can be helpful in continuous integration workflows or when managing code changes programmatically.

Use Case Examples

  1. Revert a commit by specifying the project ID and commit SHA to undo changes made by that commit.
  2. Automate rollback of problematic commits in a GitLab repository as part of a deployment pipeline.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method used for the API request, default is POST for this operation.
Path Parameters Parameters for the API path including project ID and commit SHA to revert.

Output

JSON

  • id - ID or URL-encoded path of the project
  • sha - Commit SHA that is reverted
  • revertCommit - Details of the revert commit created by the operation

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and commit SHA are correctly specified and URL-encoded if necessary.
  • Authentication errors may occur if the GitLab API key is missing or invalid; verify credentials.
  • API rate limits or permission issues on the GitLab project may cause failures; check user permissions and API limits.

Links

Discussion