GitLab API icon

GitLab API

Gitlab

Actions917

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 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 an API key credential.
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 request 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 control the commit data returned, such as ref_name, since, until, path, author, all, with_stats, first_parent, order, trailers, page, and per_page.
Path Parameters Collection of path parameters including the project ID or URL-encoded path required to identify the project repository.

Output

JSON

  • id - The unique identifier 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

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct to avoid 404 errors.
  • Verify authentication credentials are valid and have sufficient permissions to access the repository.
  • Check date formats for 'since' and 'until' parameters to match ISO 8601 date-time format.
  • Pagination parameters 'page' and 'per_page' should be within allowed ranges to avoid errors.

Links

Discussion