GitLab API

GitlabTool

Actions1000

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. Practical examples include code review comments, collaboration notes, or automated messages from CI/CD pipelines.

Use Case Examples

  1. Posting a review comment on a commit after automated tests run.
  2. Adding a note to a commit to explain a change or fix.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the 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.
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 comment created on the commit.
  • note - The content of the comment posted on the commit.
  • author
    • id - The ID of the user who posted the comment.
  • created_at - Timestamp when the comment was created.
  • commit_id - The SHA of the commit the comment is associated with.

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 GitLab API key is missing or invalid; verify credentials.
  • HTTP method should be POST for creating comments; using other methods may cause failure.

Links

Discussion