GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves the statuses of a specific commit in a GitLab project's 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 this to check if a commit has passed all tests or if any build stages have failed.

Use Case Examples

  1. Checking the build status of a commit before merging a feature branch.
  2. Monitoring pipeline statuses for a specific commit to trigger notifications or further automation.

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.
Query Parameters Optional filters and pagination for the commit statuses.
Path Parameters Required identifiers for the project and commit.

Output

JSON

  • id - Unique identifier of the commit status.
  • status - Current status of the commit (e.g., success, failed).
  • name - Name of the job or status.
  • stage - Build stage associated with the status.
  • ref - Branch or tag name related to the status.
  • pipeline_id - ID of the pipeline the status belongs to.
  • created_at - Timestamp when the status was created.
  • updated_at - Timestamp when the status was last updated.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and commit SHA are correctly provided; otherwise, the API will return an error.
  • Authentication errors may occur if the GitLab API key is missing or invalid; verify credentials.
  • Pagination parameters should be used carefully to avoid missing data or excessive API calls.
  • Invalid query parameters (e.g., incorrect branch name or pipeline ID) may result in empty or error responses.

Links

Discussion