GitLab API

GitlabTool

Actions1000

Overview

This node operation performs a rebase on a specific merge request within a GitLab project using the GitLab API. It is useful for developers and DevOps engineers who want to programmatically update a merge request by rebasing it onto the latest target branch, ensuring the merge request is up to date before merging. For example, it can be used in CI/CD pipelines to automate the rebase process of merge requests.

Use Case Examples

  1. Automate rebasing of a merge request before running integration tests.
  2. Keep merge requests up to date with the target branch in a GitLab project automatically.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the API request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but can be set to PUT for this operation.
Path Parameters Parameters required in the URL path to identify the project and merge request to rebase.

Output

JSON

  • statusCode - HTTP status code of the API response indicating success or failure of the rebase operation.
  • body - The response body containing details about the merge request after the rebase operation.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID and merge request IID are correctly provided and exist in the GitLab instance.
  • Verify that the authentication credentials are valid and have sufficient permissions to perform a rebase on the merge request.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages may include 404 Not Found if the project or merge request does not exist, or 401 Unauthorized if authentication fails.

Links

Discussion