GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation updates a specific merge request in a GitLab project using the GitLab API. It is useful for automating the management of merge requests, such as changing their state, updating titles, descriptions, or other attributes programmatically. For example, it can be used in CI/CD pipelines to automatically update merge requests based on certain conditions or triggers.

Use Case Examples

  1. Updating the title or description of a merge request after code review.
  2. Changing the state of a merge request to 'merged' or 'closed' programmatically.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used, 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 update.

Output

JSON

  • id - The unique identifier of the merge request.
  • iid - The internal ID of the merge request within the project.
  • project_id - The ID of the project the merge request belongs to.
  • title - The title of the merge request.
  • description - The description or details of the merge request.
  • state - The current state of the merge request (e.g., opened, closed, merged).
  • created_at - Timestamp when the merge request was created.
  • updated_at - Timestamp when the merge request was last updated.
  • merged_by - User who merged the merge request, if applicable.
  • merged_at - Timestamp when the merge request was merged, if applicable.

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 update merge requests.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error: 404 Not Found - The project or merge request does not exist or is not accessible with the provided credentials.
  • Common error: 401 Unauthorized - Authentication failed or token is invalid.

Links

Discussion