Actions66
- Branch Actions
- File Actions
- Group Actions
- Issue Actions
- Merge Request Actions
- Pipeline Actions
- Project Actions
- Raw API Actions
- Release Actions
- Tag Actions
Overview
This node operation deletes a discussion from a specified merge request in a GitLab project. It is useful when you want to programmatically remove an entire discussion thread from a merge request, for example, to clean up resolved or obsolete conversations.
Typical scenarios include:
- Automating cleanup of discussions after issues are resolved.
- Managing merge request comments and discussions as part of a CI/CD pipeline.
- Integrating GitLab merge request management into broader workflows where discussions need to be removed based on external triggers.
Example: Automatically delete a discussion identified by its ID from a merge request when a related task is completed.
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. 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. |
| Merge Request IID | The internal ID (IID) of the merge request from which the discussion will be deleted. Must be a positive number. |
| Discussion ID | The unique identifier of the discussion to delete, e.g., '123abc'. |
Output
The output is a JSON array containing the response from the GitLab API after deleting the discussion. Typically, this will be an empty object or confirmation that the deletion was successful.
No binary data is output by this operation.
Dependencies
- Requires access to a GitLab instance via its REST API.
- Requires either saved credentials or custom input of:
- GitLab server URL
- Personal access token with appropriate API permissions to manage merge requests.
- No additional external dependencies beyond standard HTTP API calls.
Troubleshooting
- Invalid or missing credentials: Ensure that the personal access token has sufficient permissions to delete discussions in the target project.
- Invalid Project ID or Merge Request IID: Verify that the project and merge request identifiers are correct and accessible with the provided credentials.
- Invalid Discussion ID: Confirm that the discussion ID exists within the specified merge request.
- API errors: If the GitLab API returns errors (e.g., 404 Not Found), check that the resource identifiers are correct and that the user has permission to delete discussions.
- Network issues: Ensure the GitLab server URL is reachable from the n8n environment.