Skip to content

feat(reply): GitLab reply client on the reply connection (0.3.0) - #7

Merged
schmunk42 merged 2 commits into
masterfrom
feature/gitlab-reply-client
Dec 4, 2026
Merged

schmunk42 merged 2 commits into
masterfrom
feature/gitlab-reply-client

Conversation

@schmunk42

Copy link
Copy Markdown
Member

Summary

  • Reply\Gitlab\GitlabReplyClient with exactly three operations: reply in an existing discussion of a merge request or an issue, new note on a merge request or an issue, own identity (GET /user). Base URL and token come from the reply connection of an endpoint (ApiConfiguration of type gitlab, config keys base_url and token).
  • Built on m4tthumphrey/php-gitlab-api ^12.1.1 over symfony/http-client. The library client is not exposed, redirects are never followed (the library's RedirectPlugin is removed), and the token appears in no exception message or log line.
  • The library, symfony/http-client and a PSR-17 implementation are suggestions and development requirements only. The client is registered only when Gitlab\Client exists and the adapter gitlab is enabled; src/Reply/ is excluded from service discovery, so a container without the library still builds.
  • The HTTP transport is the service id dmstr_webhook.reply_http_client, an alias of http_client that an application can define itself (e.g. a MockHttpClient in tests). Without a transport the client is removed.
  • config.allow-plugins denies php-http/discovery.
  • README section, CHANGELOG 0.3.0, invariant on suggested packages in CLAUDE.md.

Tests

  • Unit: the client against a recording HTTP fake that fails on any request outside the three operations, on a foreign host and on body keys other than body; fixtures derived from the documentation and source code of GitLab v15.11.0 (not captured), including the reply to an individual note, an unknown discussion (404) and a discussion that cannot be replied to (400).
  • Integration: ContainerVariantsTest without the library, with the adapter gitlab disabled, with a host transport and without http_client.
  • Local runs without a database: unit 1001 tests (3 skipped), integration 82 tests. The group database runs in the workflow Tests on PostgreSQL and MySQL 8.

🤖 Generated with Claude Code

schmunk42 and others added 2 commits December 4, 2026 16:42
…onnection [*]

GitlabReplyClient replies in a discussion, adds a note and reads its own
identity on merge requests and issues, with base URL and token from the
reply connection of an endpoint (ApiConfiguration of type gitlab). It is
built on m4tthumphrey/php-gitlab-api ^12.1.1 over the Symfony HTTP client,
does not expose the library client, follows no redirects and keeps the
token out of exceptions and logs.

The library, nyholm/psr7 and symfony/http-client are development
requirements and suggestions only; src/Reply/ is excluded from service
discovery so a container without the library still builds. Tests use a
recording HTTP fake and fixtures derived from GitLab v15.11.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nd the gitlab adapter, changelog for 0.3.0 [*]

The client is a private, autowired service when Gitlab\Client exists and
the adapter gitlab is enabled; otherwise the container holds nothing of
it. The decision lives in WebhookBundle::loadsOptionalComponent(), the
library check in OptionalLibraries. The transport is the service id
dmstr_webhook.reply_http_client, an alias of http_client that a host can
define itself; without a transport the client is removed.

ContainerVariantsTest covers the variants without the library, with the
adapter disabled, with a host transport and without http_client. README,
CHANGELOG 0.3.0 and the CLAUDE.md invariant on suggested packages.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@schmunk42 schmunk42 self-assigned this Dec 4, 2026
@schmunk42
schmunk42 merged commit 004f916 into master Dec 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant