GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves the statuses of a specific commit in a GitLab project repository. It is useful for monitoring the state of CI/CD pipelines, build stages, or jobs associated with a particular commit. For example, developers can use it to check if a commit passed all tests or to track the progress of deployment pipelines.

Use Case Examples

  1. Get the build status of a commit by specifying the project ID and commit SHA.
  2. Filter commit statuses by branch name, build stage, or job name to get detailed pipeline information.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Parameter Schema Defines required and optional parameters for the API call, including project ID, commit SHA, and query filters like branch name, stage, job name, pipeline ID, pagination, and sorting options.
Query Parameters Collection of optional query parameters to filter and sort commit statuses, such as ref, stage, name, pipeline_id, all, order_by, sort, page, and per_page.
Path Parameters Collection of required path parameters including project ID and commit SHA to identify the commit.

Output

JSON

  • id - Unique identifier of the commit status.
  • sha - Commit SHA hash.
  • ref - Branch or tag name associated with the commit.
  • status - Status of the commit (e.g., success, failed).
  • name - Name of the job or pipeline stage.
  • stage - Build stage of the status.
  • created_at - Timestamp when the status was created.
  • started_at - Timestamp when the status started.
  • finished_at - Timestamp when the status finished.
  • allow_failure - Indicates if the failure of this status is allowed.
  • author - Information about the author who triggered the status.
  • target_url - URL to detailed status or job logs.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and commit SHA are correctly provided; otherwise, the API call will fail with a 404 error.
  • If authentication is skipped, the request may be unauthorized, resulting in a 401 error.
  • Incorrect query parameters or invalid values may cause the API to return errors or empty results; verify parameter names and types.
  • Pagination parameters (page, per_page) should be set correctly to avoid missing data or excessive data retrieval.

Links

Discussion