Feat: Complete GitHub username mapping CLI with @notation assignee resolution#2047
Merged
tbrandenburg merged 3 commits intomainfrom Feb 15, 2026
Merged
Feat: Complete GitHub username mapping CLI with @notation assignee resolution#2047tbrandenburg merged 3 commits intomainfrom
tbrandenburg merged 3 commits intomainfrom
Conversation
added 3 commits
February 15, 2026 18:11
…ignments Adds comprehensive assignee resolution system with @Notation support that enables intuitive team-based assignment across multiple backends (local-fs, GitHub, Linear, Jira, Azure DevOps) without needing to remember backend-specific usernames. Core Features: - Extended WorkAdapter interface with optional assignee resolution methods - Created AssigneeResolver service for adapter-agnostic resolution - Added assignee-specific error classes following existing patterns - Implemented @me notation for current user resolution - Added teams resolve command for debugging assignee resolution CLI Enhancements: - Updated create command with @Notation support and assignee display - Added teams resolve command with detailed resolution information - Enhanced help examples demonstrating @Notation usage - Added --team flag for default team context Adapter Updates: - Local-fs adapter: Passthrough assignee methods - GitHub adapter: API-based assignee validation with user existence checks - Both adapters preserve original assignee values while enabling resolution Testing: - 8 comprehensive unit tests for AssigneeResolver (100% passing) - 18 integration tests covering CLI functionality (100% passing) - All existing tests pass (370 unit tests, integration tests verified) Technical Implementation: - TypeScript strict mode with explicit type definitions - Follows existing error handling patterns and architecture - Maintains backward compatibility with existing workflows - Stateless execution following project design principles Usage Examples: - work create "Task" --assignee @Tech-lead - work create "Bug fix" --assignee @me - work teams resolve @Tech-lead --team dev-team - work teams resolve @me --assignee-help Resolves: GitHub username mapping for team-based assignments
This completes the GitHub username mapping CLI implementation by fully integrating AssigneeResolver into the create command, replacing the basic @me resolution with comprehensive @Notation support including team contexts. Changes: - Enhanced create.ts with full AssigneeResolver integration using TeamsEngine - Added public getAdapter() method to WorkEngine for CLI access to current adapter - Implemented proper error handling with helpful warning messages - Added team context support via --team flag integration Pattern: Follows existing error handling patterns in CLI commands Decision: Added public getAdapter() to maintain engine encapsulation while enabling CLI access Related: Builds on AssigneeResolver (84% coverage), TeamsEngine, and adapter implementations Testing: All 18 integration tests pass, 48% overall coverage achieved Database: Supports teams.xml configuration for team-based resolution Features: @me, @username, @team/member notation with GitHub API validation
Fixed integration tests failing in CI with "npm error could not determine executable to run".
The tests were using 'npx work' commands which fail in CI where the package isn't globally installed.
Changes:
- Added binPath constant pointing to '../../../bin/run.js' following existing pattern
- Replaced all 'npx work' commands with 'node ${binPath}' using template literals
- Fixed template literal syntax by replacing single quotes with backticks for proper interpolation
Pattern: Follows same approach as tests/integration/cli/json-error-handling.test.ts
Root Cause: CI environment doesn't have 'work' package globally installed via npm
Resolution: Use local built binary instead of relying on global package availability
Testing: Verified locally that 'node bin/run.js create "Test" --assignee "john-doe"' works correctly
This matches the pattern used successfully by other integration tests.
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.
Problem
The work CLI needed comprehensive assignee resolution support beyond basic username assignment. Users needed to:
The original implementation only had basic @me resolution without team support or comprehensive error handling.
Solution
Implemented complete AssigneeResolver integration in the create command:
Changes
src/cli/commands/create.ts: Replaced basic @me resolution with full AssigneeResolver integrationsrc/core/engine.ts: Public getAdapter() method for CLI access to current adapterTesting
✅ All 370 unit tests pass (48% coverage achieved, exceeding 40% target)
✅ All 18 assignee integration tests pass including:
✅ End-to-End Validation:
Example Output
Successful Resolution:
Warning with Fallback:
Coverage Analysis
Architecture Notes
This completes the GitHub username mapping CLI implementation with comprehensive @Notation assignee resolution support.