GitLab API

GitlabTool

Actions1000

Overview

This node operation allows updating the GitHub service integration settings for a specific GitLab project by making a PUT request to the GitLab API endpoint `/api/v4/projects/{id}/services/github`. It is useful for automating the configuration of GitHub service integration within GitLab projects, such as enabling or modifying webhook settings or other GitHub-related project services.

Use Case Examples

  1. Automatically update GitHub integration settings for a GitLab project when a new project is created.
  2. Modify webhook URLs or enable/disable GitHub service integration for multiple projects in bulk.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET but settable to PUT for this operation.
Path Parameters Parameters to specify the project ID in the request path.

Output

JSON

  • statusCode - HTTP status code returned by the API request.
  • responseBody - The JSON response body from the API after updating the GitHub service integration.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is valid and exists in the GitLab instance.
  • Verify that the API key used for authentication has sufficient permissions to update project service integrations.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include 401 Unauthorized (authentication failure), 404 Not Found (invalid project ID or endpoint), and 400 Bad Request (invalid request body). Resolving these involves verifying credentials, project ID, and request payload format.

Links

Discussion