Repository navigation
List GitLab work items from project_get_issues for migrated projects - #394
Merged
Merged
Conversation
project:issues dropped the type argument and --category option when a project had migrated to GitLab work items, so every call returned all open issues. Map them to the state:: and category:: labels used on git.drupalcode.org and pass them as the GitLab labels filter. Fixes #391 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The container autowired GitLabClient with an empty HandlerStack once ToolRegistry took it as a constructor argument, so every GitLab-backed tool failed with "Error while executing tool". Register an instance the same way the Drupal.org client is registered, and cover a GitLab tool call in ServeTest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
project_get_issues always queried the Drupal.org issue queue, which is empty for projects that moved to GitLab work items. Branch on hasIssueQueue like project:issues does and apply the same type, category, and limit filters. Fixes #393 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssues-gitlab # Conflicts: # src/Api/Mcp/ToolRegistry.php
mglaman
changed the base branch from
fix/391-gitlab-project-issues-filters
to
main
October 21, 2026 21:42
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.
Fixes #393. Builds on the filters added in #392.
The
project_get_issuesMCP tool always queried the Drupal.org issue queue. For projects that moved to GitLab work items, that queue is empty. The tool now branches onProject::$hasIssueQueue, likeproject:issuesdoes, and returnsListGitLabIssuesActionresults with the sametype,category, andlimitfilters.The tool description now says migrated projects return the
gitlab_project_issuesshape (project,issues) and thatcoredoesn't apply to them.Commits
ToolRegistry. This is a refactor. The registry took aGitLabClientconstructor argument instead of callingnew GitLabClient()in nine places, so tests can pass a mock.GitLabClientwith an emptyHandlerStack, and every GitLab-backed tool failed withError while executing tool.Serve::createServer()now registers an instance the same way it registers the Drupal.org client. One side effect: theglabtoken lookup runs once at startup instead of on every GitLab tool call.project_get_issues. This is the behavior change.Testing
ToolRegistryTestcovers both paths. A migrated project calls GitLab withlabels=state::rtbc,category::bug. A project with an issue queue never touches GitLab.ServeTest::testCallsGitLabToolOverHttpcallsgitlab_project_issuesthrough the server, which catches the container wiring bug. It fails without commit 2.project_get_issuesonsmart_contentwithtype: reviewreturned 18 work items, allstate::needsReview.project_get_issuesontokenstill returned Drupal.org issues.gitlab_project_issuesoncanvaswithtype: rtbcandcategory: bugreturned 10 work items.🤖 Generated with Claude Code