Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
7 - 2025-11-03
Added
- Workflow Filtering: New
workflow_namesparameter to filter deletions by specific workflow names (comma-separated) - Dry Run Mode: New
dry_runparameter to preview deletions without actually deleting runs - Metrics Outputs: 9 new action outputs for monitoring and alerting:
total-runs-found: Total number of workflow runs foundruns-deleted: Number of runs successfully deletedruns-failed: Number of runs that failed to deletetotal-api-requests: Total number of API requests madesuccessful-requests: Number of successful API requestsfailed-requests: Number of failed API requestsretry-attempts: Number of retry attemptsrate-limit-hits: Number of times rate limit was hitcircuit-breaker-trips: Number of times circuit breaker opened
- Circuit Breaker Pattern: Prevents cascading failures with automatic recovery
- Opens after 5 consecutive failures
- Automatically recovers after 60 seconds
- Transitions through CLOSED → OPEN → HALF_OPEN states
- Automatic Retry Logic: Exponential backoff retry for transient failures
- Maximum 3 retry attempts
- Exponential backoff: 1s, 2s, 4s
- Retries on 5xx errors, rate limits (429), and network failures
- No retries on 4xx client errors (except 429)
- Rate Limit Handling: Built-in GitHub API rate limit support
- Respects
Retry-Afterheaders - 100ms delay between deletions
- Automatic retry on rate limit errors
- Respects
- Comprehensive Test Suite: Increased test coverage from ~70% to 98.93%
- 113 tests across 4 test suites
- Circuit breaker state transition tests
- Retry logic and error handling tests
- Workflow filtering tests
- Parameter validation tests
- Enhanced Clean Logs Workflow: Comprehensive test suite with 6 test scenarios
- Basic dry run test
- Workflow filtering test
- Keep many runs test
- Delete all old runs test
- Short retention test
- Combined features test
- AI PR Review Workflow: Automated code review using AI
- Workflow Statistics: Per-workflow deletion statistics in logs
- CHANGELOG.md: Complete release history documentation
Changed
- Migrated to Biome.js: Replaced ESLint + Prettier with Biome for faster linting and formatting
- ~119 fewer dependencies
- Single tool for linting and formatting
- Faster execution (Rust-based)
- Migrated to Vitest: Replaced Jest with Vitest for modern testing
- Faster test execution
- Better TypeScript support
- Native ESM support
- Refactored Error Handling: Removed Result monad pattern for simpler, direct error handling
- Improved TypeScript type safety
- Clearer error messages
- Better stack traces
- Enhanced Logging: Improved log output with structured information
- Per-workflow statistics
- Detailed deletion progress
- Clear dry-run indicators
- Comprehensive metrics summary
- Modular Architecture: Split
api.tsinto smaller, focused modulescircuit-breaker.ts: Circuit breaker implementationretry.ts: Retry logic with exponential backofflogger.ts: Centralized logging functions- Organized into
src/config/andsrc/lib/folders
- Parameter Validation: Enhanced input validation with better error messages
- Workflow name validation (alphanumeric, spaces, dashes, underscores)
- Comprehensive range checking
- Clear error messages with parameter names
- Updated README: Comprehensive documentation with all v7 features
- Migration guide from v6 to v7
- Advanced features documentation
- Multiple usage examples
- Updated Dependencies: Major dependency updates
@types/node: 22.16.0 → 24.9.2@octokit/types: 14.1.0 → 16.0.0actions/setup-node: v4 → v6codecov/codecov-action: v4 → v5- TypeScript 5.9.3
- And many more development dependencies
Breaking Changes
- Minimum Node.js version: Increased to 24.0.0 (from 20.x)
- Tooling Migration: Migrated from ESLint + Prettier to Biome.js
- Development workflow changes for contributors
- New npm scripts:
check,check:fixinstead oflintandformat
- Internal API Changes: Logger class converted to individual functions (internal API only)
Fixed
- Improved error handling for API failures
- Better circuit breaker state management
- Fixed retry logic edge cases
- Enhanced parameter validation edge cases
Security
- Enhanced input validation for workflow names
- Improved error handling to prevent information leakage
- Rate limiting to prevent API abuse
Upgrading
From v6 to v7
Breaking Changes:
- Update your Node.js version to 24.0.0 or higher
- If contributing, migrate from ESLint/Prettier to Biome.js
New Features (Optional):
# Before (v6)
- uses: igorjs/gh-actions-clean-workflow@v6
with:
runs_older_than: 7
# After (v7) - with new features
- uses: igorjs/gh-actions-clean-workflow@v7
with:
runs_older_than: 7
workflow_names: "CI, Deploy" # Optional: Filter specific workflows
dry_run: false # Optional: Dry run modeUsing Metrics:
- name: Clean workflow runs
id: clean
uses: igorjs/gh-actions-clean-workflow@v7
with:
runs_older_than: 7
- name: Check metrics
run: |
echo "Deleted: ${{ steps.clean.outputs.runs-deleted }}"
echo "Failed: ${{ steps.clean.outputs.runs-failed }}"