GitLab API icon

GitLab API

Gitlab

Actions917

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 commits that are part of the context of a merge request, especially when those commits are no longer relevant or need to be removed for clarity or project maintenance. For example, a developer might use this operation to remove erroneous or outdated commits from the context of a merge request before merging it into the main branch.

Use Case Examples

  1. Deleting context commits from a merge request to clean up the commit history before merging.
  2. Removing specific commits from the context of a merge request to resolve conflicts or errors.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but DELETE is used for this operation.
Query Parameters Query parameters for the request, specifically the commits' SHA values to delete.
Path Parameters Path parameters for the request, including project ID and merge request IID.

Output

JSON

  • statusCode - HTTP status code of the delete operation response
  • body - Response body from the delete operation, typically empty or confirmation message

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and merge request IID are correct and exist in the GitLab instance.
  • Verify that the commits' SHA values provided in the query parameters are valid and belong to the merge request context.
  • Check that the API key used has sufficient permissions to delete context commits in the project.
  • Common error messages include 404 Not Found if the project or merge request does not exist, and 403 Forbidden if the API key lacks necessary permissions.

Links

Discussion