GitLab Extended icon

GitLab Extended

Extended GitLab node

Overview

This node integrates with GitLab to perform extended operations on various GitLab resources. Specifically, for the Merge Request resource with the Close operation, it allows users to close an existing merge request in a GitLab project. This is useful in scenarios where a merge request is no longer needed or should be marked as closed without merging.

Practical examples include:

  • Automatically closing stale or outdated merge requests.
  • Closing merge requests based on external workflow conditions.
  • Managing merge requests programmatically as part of CI/CD pipelines or issue tracking automation.

Properties

Name Meaning
Authentication Choose between using saved credentials ("Credential") or providing custom connection details ("Custom").
GitLab Server Base URL of your GitLab instance (e.g., https://gitlab.com). Used only if "Custom" authentication is selected.
Access Token Personal access token with API permissions for GitLab. Used only if "Custom" authentication is selected.
Project Owner Namespace or owner of the project. Ignored if "Project ID" is set. Used only if "Custom" authentication is selected.
Project Name Project slug or name. Ignored if "Project ID" is set. Used only if "Custom" authentication is selected.
Project ID Numeric project ID. Takes precedence over owner and name if provided. Used only if "Custom" authentication is selected.
Resource The GitLab resource to work with; here fixed to "Merge Request".
Operation The action to perform on the resource; here fixed to "Close".
Merge Request IID The internal ID number of the merge request to close (must be positive).

Output

The node outputs JSON data representing the result of the close operation on the specified merge request. This typically includes the updated merge request object from GitLab, reflecting its new state (closed). The output is structured as an array of JSON objects, each corresponding to an input item processed.

No binary data output is involved in this operation.

Dependencies

  • Requires access to a GitLab instance via its REST API.
  • Needs either saved credentials or custom authentication parameters including:
    • GitLab server URL
    • Personal access token with appropriate API permissions
    • Project identification (ID or owner/name)
  • No additional external services are required beyond GitLab.

Troubleshooting

  • Invalid or missing project identification: If neither a valid project ID nor owner/name is provided, the node will fail to locate the target project.
  • Invalid merge request IID: The merge request ID must be a positive integer; otherwise, the node throws an error.
  • Authentication errors: Ensure the personal access token has sufficient permissions to modify merge requests.
  • API errors: Network issues or GitLab API rate limits may cause failures; verify connectivity and token scopes.
  • Error messages:
    • "Unknown resource": Occurs if the resource parameter is incorrect or unsupported.
    • "mergeRequestIid must be positive": Indicates invalid merge request ID input.
    • "Invalid JSON in 'assets' parameter": Not applicable here but common in other operations when JSON inputs are malformed.

To resolve these, double-check all input parameters, ensure correct authentication setup, and validate that the merge request exists and is accessible.

Links and References

Discussion