GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves the list of commits associated with a specific merge request in a GitLab project. It is useful for developers and DevOps teams who want to track changes, review commit history, or automate workflows based on merge request commits. For example, it can be used to fetch commits for code review automation or to trigger CI/CD pipelines based on commit data.

Use Case Examples

  1. Fetch commits for a merge request to display in a custom dashboard.
  2. Automate code review comments based on commit messages in a merge request.

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

Output

JSON

  • commit_id - The unique identifier of each commit in the merge request.
  • author_name - The name of the commit author.
  • author_email - The email of the commit author.
  • message - The commit message describing the changes.
  • created_at - The timestamp when the commit was created.

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 requests and commits.
  • Check the base URL if using a self-hosted GitLab instance instead of gitlab.com.
  • Common error: 404 Not Found - The project or merge request does not exist or is inaccessible.
  • Common error: 401 Unauthorized - Authentication failed or token is invalid.

Links

Discussion