GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves the approval state of a specific merge request within a GitLab project. It is useful for developers and project managers who want to programmatically check the approval status of merge requests to manage code reviews and merge workflows efficiently. For example, it can be used in CI/CD pipelines to verify if a merge request has the necessary approvals before merging.

Use Case Examples

  1. Check the approval state of a merge request to decide if it can be merged.
  2. Automate notifications based on the approval status of merge requests.

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 used for the request, default is GET.
Path Parameters Parameters required in the request path to identify the project and merge request.

Output

JSON

  • approval_state - The approval state details of the specified merge request.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID and merge request IID are correctly specified and URL-encoded if necessary.
  • Verify that the authentication token has sufficient permissions to access the project's merge request approval state.
  • Common errors include 404 Not Found if the project or merge request does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion