Skip to content

Conversation

@thoroc
Copy link
Contributor

@thoroc thoroc commented Dec 9, 2025

Summary

Implements the modular workflows app architecture by refactoring monolithic CI/CD scripts into a testable, maintainable NX application.

Changes

  • Created NX App Structure (apps/workflows/)

    • Generated NX node application with esbuild bundler
    • Configured targets: build, test, lint, type-check
    • Set up TypeScript strict mode
  • Refactored Check Repo Settings Script

    • Split 294-line monolithic script into 8 focused modules
    • Pure business logic functions for testability
    • Comprehensive test suite (29 tests, 72 assertions)
    • Full JSDoc documentation following TSDoc conventions
  • Modular Architecture

    • apps/workflows/src/scripts/check-repo-settings/ - Business logic
    • apps/workflows/src/utils/ - Shared utilities (retry, github-summary)
    • Single responsibility per module
    • Zero lint/type errors
  • CI/CD Updates

    • Updated .github/workflows/check-repo-settings.yml to use compiled output
    • Removed legacy .github/scripts/check-repo-settings.ts
    • Updated root README with workflows app documentation

Testing

All validation passing:

  • ✅ Build: Compiles successfully
  • ✅ Test: 29/29 tests passing in ~16s
  • ✅ Lint: Zero errors
  • ✅ Type-check: Zero TypeScript errors

Documentation

  • apps/workflows/README.md - Comprehensive architecture guide
  • Root README.md - Updated with workflows app section
  • Full JSDoc comments on all public APIs

- Create NX app structure in apps/workflows/ with esbuild bundler
- Refactor monolithic check-repo-settings script into modular components
- Split 294-line script into 8 focused modules with single responsibilities
- Implement comprehensive test suite with 29 tests using Bun test runner
- Add JSDoc documentation to all public APIs following TSDoc conventions
- Convert named functions to arrow functions per ESLint prefer-arrow rule
- Update CI/CD workflow to use compiled output from workflows app
- Remove legacy .github/scripts/check-repo-settings.ts
- Update root README with workflows app documentation

Architecture:
- apps/workflows/src/scripts/check-repo-settings/ - Modular business logic
- apps/workflows/src/utils/ - Shared utilities (retry, github-summary)
- Strict TypeScript mode with full type safety
- Zero lint/type errors, 100% test coverage of business logic

See apps/workflows/README.md for complete documentation.
@thoroc thoroc force-pushed the feat/workflows-app-architecture branch from f604e0e to ee488d7 Compare December 9, 2025 22:36
@github-actions
Copy link

github-actions bot commented Dec 9, 2025

⚠️ Large PR Warning

This PR is quite large with:

  • 23 changed files
  • 1428 added lines
  • 329 deleted lines

Consider breaking it down into smaller, focused PRs for easier review.

@thoroc thoroc merged commit e28ad19 into main Dec 9, 2025
4 checks passed
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