Repository navigation
feat(reply): GitLab reply client on the reply connection (0.3.0) - #7
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reply\Gitlab\GitlabReplyClientwith 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 (ApiConfigurationof typegitlab, config keysbase_urlandtoken).m4tthumphrey/php-gitlab-api^12.1.1oversymfony/http-client. The library client is not exposed, redirects are never followed (the library'sRedirectPluginis removed), and the token appears in no exception message or log line.symfony/http-clientand a PSR-17 implementation are suggestions and development requirements only. The client is registered only whenGitlab\Clientexists and the adaptergitlabis enabled;src/Reply/is excluded from service discovery, so a container without the library still builds.dmstr_webhook.reply_http_client, an alias ofhttp_clientthat an application can define itself (e.g. aMockHttpClientin tests). Without a transport the client is removed.config.allow-pluginsdeniesphp-http/discovery.0.3.0, invariant on suggested packages inCLAUDE.md.Tests
body; fixtures derived from the documentation and source code of GitLabv15.11.0(not captured), including the reply to an individual note, an unknown discussion (404) and a discussion that cannot be replied to (400).ContainerVariantsTestwithout the library, with the adaptergitlabdisabled, with a host transport and withouthttp_client.databaseruns in the workflowTestson PostgreSQL and MySQL 8.🤖 Generated with Claude Code