GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows users to approve a specific merge request within a GitLab project via the GitLab API. It is useful in automated workflows where merge requests need to be programmatically approved as part of a CI/CD pipeline or project management automation. For example, a team could automate the approval of merge requests that pass certain tests or meet specific criteria without manual intervention.

Use Case Examples

  1. Automatically approve merge requests after successful automated testing.
  2. Approve merge requests as part of a deployment pipeline to streamline code integration.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API calls.
Authentication Select the authentication method, defaulting to GitLab API key authentication.
baseUrl 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 POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters to specify the project ID and the merge request IID to identify which merge request to approve.

Output

JSON

  • id - The ID of the approved merge request.
  • iid - The internal ID of the approved merge request.
  • project_id - The ID of the project to which the merge request belongs.
  • title - The title of the merge request.
  • state - The current state of the merge request after approval.
  • approved_by - Details of the user(s) who approved the merge request.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and merge request IID are correctly specified; incorrect values will cause the API call to fail.
  • Authentication errors may occur if the GitLab API key is missing or invalid; verify credentials are correctly configured.
  • HTTP method should be set to POST for this operation; using other methods may result in errors.

Links

Discussion