Skip to content

Conversation

@akoenig
Copy link
Owner

@akoenig akoenig commented Jul 11, 2025

No description provided.

…ndling

Enhance GitHub API integration by implementing proper null/undefined normalization
and automatic date parsing using Effect Schema primitives.

Changes:
- Relocate GitHubSchemas from Domain to Infrastructure layer
- Implement GitHub.nullable() helpers for consistent null → undefined transformation
- Convert GitHub timestamp fields to use Schema.DateFromString
- Update all entity schemas (Repository, Notification, User, PrivateUser)
- Modernize test assertions to work with native Date objects

Benefits:
- Type safety: Date | undefined instead of string | null
- Better DX: Direct Date operations without manual parsing
- Consistent nullability: undefined semantics throughout codebase
- Automatic validation: Invalid ISO strings caught at schema level
- Add proper License schema replacing Schema.Any usage
- Enhance Repository schema with merge configuration and permissions
- Improve NotificationSubject with documented API behavior discrepancies
- Update MinimalRepository to use proper License schema
- Add comprehensive documentation for actual vs specification behavior

The schemas now accurately model real GitHub API responses while maintaining
type safety and following Effect Schema best practices.
- Renamed NotificationsService to GitHubNotifications
- Renamed RepositoriesService to GitHubRepositories
- Updated all imports and exports across the codebase
- Updated layer configuration to use new service names
- Updated CLI tooling and documentation
- All tests passing with new naming convention

This provides cleaner, more intuitive API naming that follows the GitHub* prefix pattern used throughout the infrastructure layer.
Major additions and improvements:

## GitHubIssues Service Implementation
- Complete CRUD operations (list, get, create, update)
- Comment management (list, create, update, delete)
- Label operations (add, remove)
- Assignee management (add, remove)
- Comprehensive domain entities and value objects
- Full HTTP recording support with 12 test scenarios

## HTTP Client Enhancement
- Fixed DELETE method to support request body
- Enables proper GitHub API compliance for assignee removal

## CLI Architecture Refactoring
- Refactored 1500+ line record.ts into modular components
- Separated concerns: redaction, recording, CLI, and program logic
- Added service-specific recorder modules
- Improved maintainability and testability

## New CLI Features
- Added --no-redaction flag to optionally disable data redaction
- Enhanced --services flag with issues support
- Improved console feedback and progress indicators
- Updated comprehensive documentation

## Security & Testing
- Comprehensive data redaction system (default enabled)
- Safe test configurations using akoenig/effective repository
- No sensitive data in codebase (verified)
- Complete HTTP recordings for all scenarios

Files: 36 changed, 4590 insertions, 1184 deletions
…I features

- Implement complete GitHubIssues service with CRUD operations for issues, comments, labels, and assignees
- Update test specifications to match existing HTTP recordings for proper test execution
- Add comprehensive CLI recorder for GitHubIssues with all operation scenarios
- Fix HTTP client to support DELETE requests with body for GitHub API compliance
- Refactor CLI architecture into modular components for better maintainability
- Add --no-redaction flag to allow unredacted recordings when needed
- Update CLI configuration to use 'akoenig/effective' repository for testing
- Improve recording layer with better redaction and configuration options

Test fixes:
- Use existing issue numbers from recordings (issues #1, #73, #75)
- Adjust test expectations to match actual API responses
- Fix label removal and assignee tests to use correct recorded states
- Update comment tests to handle empty comment lists appropriately
- Fix listComments to return Option.some([]) for empty arrays instead of Option.none()
- Update test recordings to ensure proper API response matching
- Remove conflicting recordings that caused test sequencing issues
- All 39 tests now pass successfully
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.

2 participants