GitLab API

GitlabTool

Actions905

Overview

This node operation performs a rebase on a specific merge request in a GitLab project using the GitLab API. It is useful for developers and DevOps engineers who want to programmatically update a merge request branch with the latest changes from the target branch to resolve conflicts or keep the branch up to date. For example, it can be used in CI/CD pipelines to automate merge request maintenance.

Use Case Examples

  1. Rebasing a merge request branch before running integration tests.
  2. Automatically updating a feature branch with the latest main branch changes via a workflow.

Properties

Name Meaning
Skip Authentication Whether to skip API authentication for the request.
Authentication The authentication method used for the API request, typically an API key credential.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, default is GET but PUT is used for this operation.
Path Parameters Parameters required in the request 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 JSON response body from the GitLab API containing details about the merge request after the rebase.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID and merge request IID are correct and exist in the GitLab instance.
  • Verify that the API authentication token has sufficient permissions to perform merge request operations.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 404 Not Found if the project or merge request does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion