GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node interacts with the GitLab API to post a status to a specific commit in a project. It is useful for CI/CD pipelines, project management, or automation workflows where you need to update the status of a commit (e.g., success, failure, pending) programmatically. For example, after running tests on a commit, you can use this node to update the commit status in GitLab to reflect the test results.

Use Case Examples

  1. Updating the status of a commit after a CI job completes.
  2. Marking a commit as failed or successful based on deployment results.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters for the API path including the project ID and commit SHA.

Output

JSON

  • id - ID or URL-encoded path of the project.
  • sha - The commit hash.
  • status - The status posted to the commit, such as success, failure, or pending.
  • message - Response message or details from the API after posting the status.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and commit SHA are correct and URL-encoded if necessary.
  • Verify that the GitLab API key credential has sufficient permissions to post commit statuses.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages may include authentication failures, invalid project ID or commit SHA, or insufficient permissions. Verify credentials and input parameters to resolve these.

Links

Discussion