GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes context commits associated with a specific merge request in a GitLab project. It is useful for managing and cleaning up commit contexts in merge requests, especially when certain commits need to be removed from the context for clarity or correction.

Use Case Examples

  1. Deleting specific context commits from a merge request to update the commit history shown in the merge request.
  2. Removing erroneous or unwanted commits from the context of a merge request to maintain accurate project history.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, defaulting to GET but can be set to DELETE for this operation.
Query Parameters Query parameters for the request, specifically the commits SHA array to identify which context commits to delete.
Path Parameters Path parameters for the request, including the project ID or URL-encoded path and the merge request IID.

Output

JSON

  • statusCode - HTTP status code of the response indicating success or failure.
  • body - Response body from the GitLab API after attempting to delete the context commits.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and merge request IID are correctly specified and exist in the GitLab instance.
  • Verify that the commits SHA provided in the query parameters are valid and belong to the specified merge request.
  • Check that the authentication credentials are correctly configured and have sufficient permissions to delete context commits.
  • Common error messages may include 404 Not Found if the project or merge request does not exist, or 403 Forbidden if the authentication lacks necessary permissions.

Links

Discussion