GitLab API icon

GitLab API

Gitlab

Actions917

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 teams 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 process of keeping merge requests current.

Use Case Examples

  1. Rebasing a merge request to resolve conflicts before merging.
  2. Automating merge request updates in a GitLab project as part of a deployment workflow.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API 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 for this operation it is PUT.
Path Parameters Parameters required in the request path to identify the project and merge request to rebase.

Output

JSON

  • status - The HTTP status code of the rebase operation response.
  • data - The JSON response data from the GitLab API after attempting the rebase, typically including merge request details or error information.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID and merge request IID are correctly specified and URL-encoded if necessary.
  • Verify that the API authentication token has sufficient permissions to perform merge request operations.
  • Check the GitLab instance URL if using a self-hosted GitLab server instead of gitlab.com.
  • Common errors include 404 Not Found if the project or merge request does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion