GitLab API

GitlabTool

Actions1000

Overview

This node operation interacts with the GitLab API to render a project badge image based on provided parameters. It is useful for dynamically generating badges for GitLab projects, such as build status or coverage badges, which can be embedded in documentation or project pages. For example, a user can specify a project ID, badge image URL, and link URL to get a rendered badge image from GitLab.

Use Case Examples

  1. Generating a build status badge for a specific GitLab project by providing the project ID and URLs for the badge image and link.
  2. Creating a coverage badge for a project that links to the project's pipeline page.

Properties

Name Meaning
Skip Authentication Determines whether to skip API authentication for the request.
Authentication Specifies the authentication method to use, typically a GitLab API key credential.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method The HTTP method used for the API request (GET, POST, PUT, DELETE, HEAD, PATCH).
Query Parameters Collection of query parameters for the request, including the badge link URL and image URL.
Path Parameters Collection of path parameters for the request, specifically the project ID.

Output

JSON

  • response - The rendered badge image or response from the GitLab API

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID is correct and accessible by the authenticated user to avoid authorization errors.
  • Verify that the badge image URL and link URL are valid and properly URL-encoded to prevent request failures.
  • If skipping authentication, confirm that the GitLab instance allows unauthenticated access to the badge rendering endpoint.

Links

Discussion