GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves blame information for a specific file in a GitLab project repository. It is useful for tracking line-by-line authorship and changes within a file, which helps in understanding code history and accountability. For example, developers can use it to see who last modified certain lines of code in a project file on a specific branch or commit.

Use Case Examples

  1. Get blame information for a file 'lib/class.rb' in the 'gitlab-org/gitlab' project on the 'main' branch, specifying a line range to focus on.
  2. Track changes and authorship for a file in a project repository to assist in code review or debugging.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Useful for public projects or when authentication is not required.
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, default is GET.
Parameter Schema Defines required path and query parameters for the API call, including project ID, file path, branch/tag/commit reference, and line range for blame.
Query Parameters Collection of query parameters including 'ref' (branch/tag/commit), 'range[start]' (start line), and 'range[end]' (end line) to specify the blame range.
Path Parameters Collection of path parameters including 'id' (project ID) and 'file_path' (URL encoded file path) to identify the file to blame.

Output

JSON

  • blame - Blame information for the specified file and line range, including details about authorship and changes.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and file path are correctly URL encoded and valid.
  • Verify that the specified branch, tag, or commit reference exists in the project repository.
  • Check that the line range specified in 'range[start]' and 'range[end]' is within the bounds of the file.
  • Authentication errors may occur if the API key is missing or invalid; ensure proper credentials are configured.

Links

Discussion