GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows users to post comments on a specific commit in a GitLab project repository. It is useful for adding feedback, notes, or discussions directly tied to a particular commit identified by its SHA, branch name, or tag. Common scenarios include code review processes, collaborative development, and tracking changes or issues related to specific commits.

Use Case Examples

  1. A developer wants to add a comment on a commit to highlight a bug fix.
  2. A team lead posts a review comment on a commit to suggest improvements.
  3. Automated systems add comments to commits to indicate build or test 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, defaulting to https://gitlab.com.
Method HTTP method to use for the request, defaulting to GET but can be set to POST for this operation.
Path Parameters Parameters for the API path including project ID and commit SHA or branch/tag name.

Output

JSON

  • id - The unique identifier of the posted comment.
  • note - The content of the comment posted on the commit.
  • author
    • id - The unique identifier of the author who posted the comment.
    • name - The name of the author who posted the comment.
  • created_at - Timestamp when the comment was created.
  • updated_at - Timestamp when the comment was last updated.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and commit SHA or branch/tag name are correctly specified; otherwise, the API will return an error.
  • Authentication errors may occur if the API key is missing or invalid; verify the credentials are correctly configured.
  • HTTP method must be set to POST for this operation to successfully post a comment.
  • Check the base URL if using a self-hosted GitLab instance to avoid connection issues.

Links

Discussion