Skip to content

Conversation

tkstang
Copy link
Owner

@tkstang tkstang commented Sep 14, 2025

🚀 v0.2.0 - Major Feature Expansion & E2E Testing

📋 Overview

This release significantly expands the github-typescript-utils package with 50+ new utility functions across 9 categories, comprehensive testing infrastructure, and end-to-end validation with the github-typescript composite action.

✨ New Features

🔧 New Utility Categories

⚙️ Input Processing

  • sanitizeInput() - Remove quotes from workflow inputs
  • sanitizeInputs() - Sanitize all string properties in objects
  • getBranch() - Extract branch from any GitHub event type

🔤 String Utilities

  • snakeToCamel() / camelToSnake() - Snake case ↔ camel case conversion
  • kebabToCamel() / camelToKebab() - Kebab case ↔ camel case conversion
  • capitalize() / toTitleCase() - Text capitalization utilities

🌿 Branch Management

  • checkBranchExists() - Verify branch existence
  • listAllBranches() - Get all repository branches
  • getBranchProtection() - Retrieve branch protection rules
  • getDefaultBranch() - Get repository default branch

🚀 Deployment Management

  • listDeployments() - List repository deployments
  • createDeployment() - Create new deployments
  • setDeploymentStatus() - Update deployment status
  • getDeploymentStatuses() - Get deployment status history
  • deleteDeployment() - Remove deployments

🔍 Advanced PR Search

  • findPRsWithLabels() - Find PRs with specific label combinations
  • searchPullRequests() - Advanced PR search with multiple criteria
  • findOpenPRsWithLabel() - Convenience function for open PR searches
  • checkLabelConflicts() - Detect label conflicts between PRs

💬 Enhanced Comment Management

  • deleteComment() - Remove comments by ID
  • deleteStickyComment() - Remove sticky comments by identifier

🧪 Testing Infrastructure

Comprehensive Test Suite

  • 110+ unit tests with 94%+ code coverage
  • Type-safe test mocks with createMockContext helper
  • All utility functions tested across all categories
  • Edge case coverage for error handling and API responses

E2E Testing with github-typescript

  • End-to-end validation using the actual github-typescript composite action
  • Real package resolution testing via file:../../ dependency
  • Bundling verification with esbuild integration
  • CI workflow integration running in parallel with unit tests

Testing Tools

  • Vitest 3.2.4 for fast, modern testing
  • Coverage reporting with v8 provider
  • GitHub Actions integration with dynamic coverage summaries
  • Parallel test execution for optimal CI performance

📚 Documentation Improvements

Enhanced README

  • Complete function reference table with 50+ functions across 9 categories
  • Dependency setup guide for both root and isolated CI dependencies
  • Comprehensive usage examples for all utility categories
  • Type definitions documentation with exported types
  • Real-world examples including build status updater and PR triage bot

Better Developer Experience

  • Full TypeScript support with comprehensive type definitions
  • JSDoc documentation for all functions
  • IntelliSense support with detailed parameter descriptions
  • Clear error messages and proper error handling

🔧 Technical Improvements

Build & Development

  • Vitest configuration with coverage reporting
  • Type-safe development with strict TypeScript checking
  • Biome integration for consistent code formatting
  • CI/CD enhancements with parallel job execution

Package Management

  • Peer dependencies properly configured for Actions ecosystem
  • ESM module support with proper exports configuration
  • Version management with semantic versioning

Bug Fixes

  • Fixed getPullRequestFiles() to conditionally include patch property
  • Improved error handling in branch and deployment utilities
  • Enhanced type safety across all utility functions

🚀 CI/CD Enhancements

Workflow Improvements

  • Parallel job execution (lint, test, test-e2e run concurrently)
  • Dynamic coverage reporting in GitHub Actions summaries
  • E2E testing validates real-world usage patterns
  • Dependency caching for faster CI runs

Quality Assurance

  • Automated testing on every PR and push
  • Coverage thresholds maintained above 94%
  • Type checking integrated into CI pipeline
  • Linting and formatting enforced automatically

📊 Package Stats

  • 50+ utility functions across 9 categories
  • 110+ comprehensive tests with 94%+ coverage
  • Full TypeScript support with exported types
  • Zero runtime dependencies (peer deps only)
  • ESM module with modern JavaScript support

🔄 Breaking Changes

None - this is a feature addition release maintaining full backward compatibility.

📦 Migration Guide

No migration needed - all existing code continues to work. New utilities are available for import:

import {
  // New input utilities
  sanitizeInput,
  getBranch,

  // New string utilities
  snakeToCamel,
  camelToSnake,

  // New branch utilities
  checkBranchExists,
  listAllBranches,

  // New deployment utilities
  listDeployments,
  createDeployment,

  // Enhanced comment utilities
  deleteComment,
  deleteStickyComment,
} from "github-typescript-utils";

🎯 What's Next

This release establishes github-typescript-utils as a comprehensive toolkit for GitHub Actions automation. Future releases will focus on:

  • Additional specialized utilities based on community feedback
  • Performance optimizations for large-scale operations
  • Enhanced error handling and retry mechanisms
  • More real-world usage examples and patterns

Ready to upgrade? Install with pnpm add github-typescript-utils@^0.2.0 and explore the new utilities! 🚀

@tkstang tkstang merged commit 46b22d9 into main Sep 14, 2025
5 checks passed
@tkstang tkstang deleted the v2-utils branch September 14, 2025 23:08
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.

1 participant