GitLab API

GitlabTool

Actions905

Overview

This node operation allows users to add spent time to a specific merge request in a GitLab project via the GitLab API. It is useful for tracking time spent on code reviews or merge request tasks directly within GitLab. For example, a project manager or developer can log hours spent on a merge request to maintain accurate project time tracking and reporting.

Use Case Examples

  1. Adding 2 hours of spent time to a merge request with internal ID 15 in project 'my-group/my-project'.
  2. Logging time spent on a merge request to keep track of development effort and improve project management.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the API 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 but POST is used for this operation.
Path Parameters Parameters for the API path including project ID or URL-encoded path and the internal ID of the merge request.

Output

JSON

  • time_spent - The amount of time added as spent time on the merge request.
  • merge_request_id - The internal ID of the merge request to which time was added.
  • project_id - The ID of the project containing the merge request.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and merge request IID are correct and exist in the GitLab instance.
  • Verify that the API key has sufficient permissions to add spent time to merge requests.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error: 401 Unauthorized - indicates authentication failure; verify API key and authentication settings.
  • Common error: 404 Not Found - indicates the project or merge request does not exist or the path parameters are incorrect.

Links

Discussion