GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves commits from a GitLab project's repository using the GitLab API v4. It is useful for scenarios where you need to fetch commit history, filter commits by branch, date, author, or file path, and obtain detailed commit statistics. For example, it can be used to monitor changes in a project, generate reports on commit activity, or integrate commit data into other workflows.

Use Case Examples

  1. Fetch all commits from a specific branch of a GitLab project.
  2. Retrieve commits made by a particular author within a date range.
  3. Get commit statistics for a file in the repository.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically a GitLab API key.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, default is GET.
Parameter Schema Defines the parameters for the API call including project ID, branch/tag name, date filters, file path, author, pagination, and other commit filtering options.
Query Parameters Collection of optional query parameters to filter and paginate the commits returned by the API.
Path Parameters Collection containing the project ID or URL-encoded path required to identify the project in the API call.

Output

JSON

  • id - The commit ID (SHA) of the commit.
  • short_id - A shortened version of the commit ID.
  • title - The commit message title.
  • author_name - Name of the commit author.
  • author_email - Email of the commit author.
  • created_at - Timestamp when the commit was created.
  • message - Full commit message.
  • stats - Statistics about the commit such as additions, deletions, and total changes (if requested).
  • trailers - Git trailers parsed from the commit message (if requested).

Dependencies

  • Requires GitLab API access with an API key or token for authentication.

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct to avoid 404 errors.
  • Verify that the API token has sufficient permissions to access the repository commits.
  • Check date formats for 'since' and 'until' parameters to match ISO 8601 date-time format.
  • Pagination parameters 'page' and 'per_page' should be within valid ranges to avoid empty or incomplete results.

Links

Discussion