feat(services): add Packagist integration

Description

Adds support for the Packagist project integration:

  • GetPackagistService – GET /projects/:id/integrations/packagist
  • SetPackagistService – PUT /projects/:id/integrations/packagist
  • DeletePackagistService – DELETE /projects/:id/integrations/packagist

SetPackagistServiceOptions covers all documented parameters: username, token, server, push_events, merge_requests_events, tag_push_events and use_inherited_settings. PackagistServiceProperties exposes username and server (the API does not return token).

This is needed for the new gitlab_project_integration_packagist resource in the Terraform provider: gitlab-org/terraform-provider-gitlab!3389

Note: the API docs list server as boolean, but it is a URL string (default https://packagist.org).

Testing

  • Unit tests for Get/Set/Delete in services_test.go
  • Regenerated testing/services_mock.go
  • go test -race ./... and golangci-lint run pass

Merge request reports

Loading
Loading