GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves details of a specific remote mirror for a GitLab project using the GitLab API. It is useful for scenarios where you need to monitor or manage remote mirrors of a project, such as checking the status or configuration of a mirror. For example, a user can fetch the remote mirror information by providing the project ID and the mirror ID.

Use Case Examples

  1. Fetch remote mirror details for a project to verify synchronization status.
  2. Retrieve configuration details of a remote mirror to audit project mirroring setup.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Path Parameters Parameters required in the request path, including project ID and mirror ID.

Output

JSON

  • id - The ID of the remote mirror.
  • url - The URL of the remote mirror.
  • enabled - Indicates if the remote mirror is enabled.
  • only_protected_branches - Indicates if only protected branches are mirrored.
  • keep_divergent_refs - Indicates if divergent refs are kept.
  • mirror_trigger_builds - Indicates if mirror triggers builds.
  • last_update_at - Timestamp of the last update to the mirror.
  • last_successful_update_at - Timestamp of the last successful update.
  • status - Current status of the remote mirror.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID and mirror ID are correctly provided and URL-encoded if necessary.
  • Verify that the authentication token has sufficient permissions to access project remote mirrors.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 404 Not Found if the project or mirror does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion