Skip to content

v2.9.0: Complete Comment Management & API Consistency

Choose a tag to compare

@jordanpartridge jordanpartridge released this 26 Jul 22:52
· 10 commits to master since this release
d0c3612

🎯 v2.9.0: Complete Comment Management & API Consistency

This major release delivers comprehensive comment management capabilities and API consistency improvements, making github-client the most complete GitHub API client for comment automation.

πŸš€ Major Features

βœ… Complete Comment Management CRUD (Issues #91, #92, #93)

Full lifecycle management for both issue/PR general comments and PR review comments:

Issue/PR General Comments

  • IssuesResource::getComment($owner, $repo, $commentId): IssueCommentDTO
  • IssuesResource::updateComment($owner, $repo, $commentId, $body): IssueCommentDTO
  • IssuesResource::deleteComment($owner, $repo, $commentId): bool

PR Review Comments (Inline Code Comments)

  • PullRequestResource::getComment($owner, $repo, $commentId): PullRequestCommentDTO
  • PullRequestResource::updateComment($owner, $repo, $commentId, $body): PullRequestCommentDTO
  • PullRequestResource::deleteComment($owner, $repo, $commentId): bool

βœ… API Consistency Improvements (Issue #16)

Standardized repository operations with consistent validation:

  • All repository methods now use Repo value objects
  • Added convenience methods: Github::getRepo() and Github::deleteRepo()
  • Consistent validation patterns across all operations
  • 100% backward compatible

βœ… Conduit CLI Integration Ready (Issue #93)

Complete design documentation for CLI development:

  • CONDUIT_CLI_INTEGRATION.md with command architecture
  • Implementation patterns for unified comment management
  • Ready-to-use examples for CLI developers

🎯 Use Cases Enabled

Developer Workflows

// Edit any comment type
$comment = Github::issues()->getComment('owner', 'repo', 12345);
$updated = Github::issues()->updateComment('owner', 'repo', 12345, 'Fixed in v2.9.0\!');

// Clean up review comments  
$reviewComment = Github::pullRequests()->getComment('owner', 'repo', 67890);
Github::pullRequests()->deleteComment('owner', 'repo', 67890);

// Consistent repo operations
$repo = Github::getRepo('owner/repo');  // Auto-validates
$success = Github::deleteRepo('owner/repo');  // Auto-validates

Automation Ready

  • CI/CD Comment Management: Update PRs with build status
  • Code Review Automation: Clean up resolved discussions
  • Issue Management: Programmatic comment updates
  • Bulk Operations: Process multiple comments efficiently

πŸ”§ Technical Excellence

Quality Assurance

  • 204 tests passing (719 assertions)
  • PHPStan clean (0 errors)
  • PHP Pint compliant (auto-formatted)
  • Full backward compatibility maintained

New Request Classes (6 total)

  • Issues: GetComment.php, UpdateComment.php, DeleteComment.php
  • Pulls: GetComment.php, UpdateComment.php, DeleteComment.php

Enhanced Resources

  • IssuesResource: 3 new comment management methods
  • PullRequestResource: 3 new review comment methods
  • Consistent patterns and error handling throughout

πŸ“Š Impact

This release transforms github-client into a complete comment management platform, enabling:

  • Full Comment Lifecycle: Create, Read, Update, Delete for all comment types
  • Advanced Automation: Perfect for CI/CD and review workflows
  • Type-Safe APIs: Robust development with comprehensive validation
  • Conduit CLI Foundation: All APIs needed for CLI comment commands

πŸŽ‰ Resolves

  • #91: Add CRUD operations for Issue/PR General Comments
  • #92: Add CRUD operations for PR Review Comments
  • #93: Add unified Comment Management commands to Conduit CLI (design)
  • #16: Inconsistent API Design and Parameter Handling
  • #94: Add missing pr_data fields (already resolved in v2.8.0)
  • #95: Add missing merge_data fields (already resolved in v2.8.0)

Perfect foundation for advanced GitHub automation and the most comprehensive comment management available! πŸš€