GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves references (branches, tags, or all) associated with a specific commit SHA in a GitLab project repository. It is useful for scenarios where you need to find out which branches or tags contain a particular commit, such as tracking changes, auditing, or managing releases.

Use Case Examples

  1. Get all references for a commit SHA in a project to see where the commit is used.
  2. Filter references by type (branch or tag) to narrow down the search for a commit's location.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Optional query parameters to filter and paginate the results.
Path Parameters Required path parameters identifying the project and commit SHA.

Output

JSON

  • id - The project ID or URL-encoded path.
  • sha - The commit SHA.
  • type - The scope of the reference (branch, tag, or all).
  • refs - List of references (branches or tags) associated with the commit.
  • page - Current page number of the results.
  • per_page - Number of items per page in the results.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and commit SHA are correctly provided and URL-encoded if necessary.
  • Verify that the authentication token has sufficient permissions to access the project repository.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Pagination parameters (page and per_page) should be valid integers to avoid request errors.

Links

Discussion