GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves the context commits of a specific merge request within a GitLab project using the GitLab API. It is useful for scenarios where you need to analyze or display the commits related to a particular merge request, such as in CI/CD pipelines, code review automation, or project management dashboards.

Use Case Examples

  1. Fetch all commits associated with a merge request to display in a custom dashboard.
  2. Use the commits data to trigger additional automation based on commit messages or authors.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, 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 GET.
Path Parameters Parameters required in the API path to specify the project and merge request.

Output

JSON

  • context_commits - List of commits related to the specified merge request in the project.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID and merge request IID are correctly specified and exist in the GitLab instance.
  • Verify that the authentication token has sufficient permissions to access the project's merge requests.
  • Check the base URL if using a self-hosted GitLab instance instead of gitlab.com.
  • Common error messages include 404 Not Found if the project or merge request does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion