GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation performs a PUT request to merge a specific merge request in a GitLab project using the GitLab API. It is useful for automating the process of merging merge requests programmatically within CI/CD pipelines or project management workflows. For example, it can be used to automatically merge a feature branch into the main branch after passing all tests.

Use Case Examples

  1. Automatically merge a merge request after successful build and test.
  2. Programmatically merge a merge request based on custom approval rules.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, default is PUT for this operation.
Path Parameters Parameters required in the URL path to identify the project and merge request to merge.

Output

JSON

  • status - The HTTP status of the merge request operation response.
  • data - The JSON response data from the GitLab API after attempting to merge the merge request.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID and merge request IID are correct and exist in the GitLab instance.
  • Verify that the authentication token has sufficient permissions to merge merge requests.
  • 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, 401 Unauthorized if authentication fails, and 405 Method Not Allowed if the HTTP method is incorrect.

Links

Discussion