feat: add project:search command and drupalorg-issue-search skill#318
feat: add project:search command and drupalorg-issue-search skill#318mglaman merged 4 commits intomglaman:mainfrom
Conversation
Add a new `project:search` (alias `ps`) command that searches a project's issues by title keyword, with status filtering and all output formats. Includes the Action class, CLI command, MCP tool registration, and a new `/drupalorg-issue-search` skill that combines API search, Drupal.org issue queue scraping, and web search for comprehensive results. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Here's an example of this working for a commerce stripe issue I'm familiar with. I've realized we probably want to add more filters for branch, component, etc... Let' me know your feels on the overall approach, including if you think we'd be spamming d.o with the web scrape flag and I'll update the MR. |
mglaman
left a comment
There was a problem hiding this comment.
Some projects are migrating to Gitlab issues. I don't think there's anyway to detect that. Can be a follow up for support, but that would fix searching.
There was a problem hiding this comment.
Pull request overview
Adds a project:search command for searching Drupal.org project issues by title keyword, with corresponding MCP tool registration and a new drupalorg-issue-search agent skill that combines API, scrape, and web search channels.
Changes:
- New
SearchProjectIssuesActionthat queries the Drupal.org API and filters results client-side by title substring match - New
ProjectSearchCLI command with--status,--limit, and--formatoptions, plus MCP toolproject_search_issues - New
drupalorg-issue-searchskill and documentation updates inCLAUDE.mdandSKILL.md
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Api/Action/Project/SearchProjectIssuesAction.php | New action: fetches issues from API and filters by query client-side |
| src/Cli/Command/Project/ProjectSearch.php | New CLI command project:search with status/limit/format options |
| src/Cli/Application.php | Registers the new ProjectSearch command |
| src/Api/Mcp/ToolRegistry.php | Adds project_search_issues MCP tool |
| skills/drupalorg-issue-search/SKILL.md | New agent skill for multi-channel issue search |
| skills/drupalorg-cli/SKILL.md | Documents the new project:search command |
| CLAUDE.md | Adds skill and command references |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| $status = (string) $this->stdIn->getOption('status'); | ||
| $statuses = self::STATUS_MAP[$status] ?? self::STATUS_MAP['open']; |
| 'limit' => $limit * 3, | ||
| ]; | ||
| if ($statuses !== []) { | ||
| $params['field_issue_status[value]'] = $statuses; | ||
| } | ||
| $rawIssues = $this->client->requestRaw(new Request('node.json', $params)); | ||
| $issueList = (array) ($rawIssues->list ?? []); | ||
| $issues = array_map( | ||
| static fn(\stdClass $issue) => IssueNode::fromStdClass($issue), | ||
| $issueList | ||
| ); | ||
|
|
||
| $issues = array_filter( | ||
| $issues, | ||
| static fn(IssueNode $issue) => stripos($issue->title, $query) !== false | ||
| ); | ||
| $issues = array_slice(array_values($issues), 0, $limit); |
New command: project:search (ps) — searches a project's issues by title keyword with --status filtering (all/open/closed/rtbc/review, defaults to all)
New skill: /drupalorg-issue-search — combines three search channels:
Supports --skip=api,drupal,web to selectively disable channels, --project and --status flags.
Other changes: MCP tool registration, CLAUDE.md updates, skill install support.