GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves the context commits of a specific merge request in a GitLab project using the GitLab API v4. 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.
  3. Integrate with other tools to provide detailed merge request insights.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the API request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method 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

  • commit_id - The unique identifier of each commit in the merge request context.
  • author_name - Name of the commit author.
  • author_email - Email of the commit author.
  • message - Commit message describing the changes.
  • created_at - Timestamp when the commit was created.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID and merge request IID are correctly provided and URL-encoded if necessary.
  • Verify that the authentication credentials are valid and have sufficient permissions to access the merge request data.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.

Links

Discussion