GitLab API icon

GitLab API

Gitlab

Actions880

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 recent changes in a project, analyze 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, hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the API request, default is GET.
Query Parameters Optional query parameters to filter and control the commits returned, such as branch name, date range, file path, author, pagination, and ordering.
Path Parameters Path parameters for the API request, specifically the project ID or URL-encoded path.

Output

JSON

  • id - The commit ID (SHA).
  • short_id - Shortened commit ID.
  • title - Commit title or message.
  • 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 and deletions.
  • trailers - Git trailers parsed from the commit message, if requested.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct to avoid 404 errors.
  • Verify authentication credentials if authentication is not skipped, to prevent authorization errors.
  • Check date formats for 'since' and 'until' parameters to match ISO 8601 date-time format.
  • Pagination parameters 'page' and 'per_page' should be valid integers to avoid request errors.

Links

Discussion