GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to post a status to a specific commit in a GitLab project. It is useful for updating the status of a commit, such as marking it as successful, failed, or pending, which is commonly used in CI/CD pipelines or project status tracking.

Use Case Examples

  1. A developer wants to update the status of a commit after running automated tests to indicate whether the tests passed or failed.
  2. A DevOps engineer uses this node to mark a commit as deployed once it has been successfully released to production.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but can be POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters to specify the project ID or URL-encoded path and the commit SHA hash to identify the commit to update the status for.

Output

JSON

  • id - ID or URL-encoded path of the project.
  • sha - The commit hash.
  • status - The status posted to the commit.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and commit SHA are correctly specified; incorrect values will cause the request to fail.
  • Authentication errors may occur if the GitLab API key is missing or invalid; verify the API key credentials.
  • HTTP method must be set appropriately; for posting a status, the method should be POST.
  • Check the base URL if using a self-hosted GitLab instance instead of the default https://gitlab.com.

Links

Discussion