Skip to content

Apply type and category filters to GitLab work item issue lists - #392

Merged
mglaman merged 2 commits into
mainfrom
fix/391-gitlab-project-issues-filters
Oct 21, 2026
Merged

mglaman merged 2 commits into
mainfrom
fix/391-gitlab-project-issues-filters

Conversation

@mglaman

@mglaman mglaman commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Fixes #391.

On projects that migrated to GitLab work items, project:issues dropped the type argument and --category option. Every call returned the latest open issues, unfiltered.

The filters now map to the scoped labels on git.drupalcode.org and go out as the GitLab labels query parameter. GitLab ANDs multiple labels.

Input Label
rtbc state::rtbc
review state::needsReview
all (none)
--category=<name> category::<name>

Changes

  • ProjectIssueType::gitLabLabel() and ProjectIssueCategory::gitLabLabel() own the mapping, next to the existing categoryId().
  • ListGitLabIssuesAction accepts ProjectIssueType $type and ?ProjectIssueCategory $category. Both are trailing optional parameters, so existing callers keep working.
  • ProjectIssues parses type and --category once and passes them to both the Drupal.org and GitLab branches.
  • The gitlab_project_issues MCP tool exposes the same type and category filters.

Testing

  • New ListGitLabIssuesActionTest covers each filter combination and the resulting labels parameter.
  • PHPUnit, PHPStan, and PHPCS pass.
  • Live runs:
$ drupalorg project:issues smart_content review --limit=50 -f json   # 18 issues, all state::needsReview
$ drupalorg project:issues smart_content --category=bug --limit=50 -f json   # 26 issues, all category::bug
$ drupalorg project:issues canvas rtbc --category=bug --limit=50 -f json   # 10 issues, all state::rtbc + category::bug

The MCP gitlab_project_issues call with type: rtbc, category: bug on canvas returned the same 10 issues.

🤖 Generated with Claude Code

mglaman and others added 2 commits October 21, 2026 16:35
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>
@mglaman
mglaman merged commit a9f6e9a into main Oct 21, 2026
9 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.

project:issues command ignores type argument (rtbc, review) and --category option on projects migrated to GitLab Work Items

1 participant