Skip to content

Conversation

@Coderrob
Copy link
Owner

Description

chore: update package.json to include jscpd and madge for code duplication analysis
build: create rollup.config.js for ES module bundling
fix: modify rollup.config.ts to handle circular dependency warnings
test: refactor action tests to use ILogger for logging
refactor: update Action class to use ILogger for logging instead of core
docs: add JSDoc comments for Action class and methods
chore: update tsconfig.json for better module isolation
chore: add tsconfig.test.json for test-specific TypeScript configuration

Checklist

  • Changes have been tested locally.
  • Documentation has been updated accordingly.
  • Changes have been verified to have no runtime errors.

…ctions

chore: update package.json to include jscpd and madge for code duplication analysis

build: create rollup.config.js for ES module bundling

fix: modify rollup.config.ts to handle circular dependency warnings

test: refactor action tests to use ILogger for logging

refactor: update Action class to use ILogger for logging instead of core

docs: add JSDoc comments for Action class and methods

chore: update tsconfig.json for better module isolation

chore: add tsconfig.test.json for test-specific TypeScript configuration
Copilot AI review requested due to automatic review settings September 19, 2025 19:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a logger abstraction layer to improve testability and maintainability of the GitHub Action by replacing direct @actions/core usage with an ILogger interface. It also includes build configuration improvements and enhanced documentation.

Key changes:

  • Adds ILogger interface and CoreLogger implementation for better dependency injection
  • Refactors Action class to use ILogger instead of direct @actions/core calls
  • Updates build configuration with new rollup.config.js and circular dependency handling
  • Adds comprehensive project documentation and EditorConfig setup

Reviewed Changes

Copilot reviewed 12 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/logger.ts New logger interface and implementation wrapping @actions/core
src/action.ts Refactored to use ILogger dependency injection with JSDoc documentation
src/action.test.ts Updated tests to use mocked ILogger instead of @actions/core
src/index.ts Added JSDoc documentation and improved function structure
rollup.config.js New ES module build configuration with circular dependency handling
package.json Added jscpd, madge tools and updated build scripts
tsconfig.test.json Added isolatedModules setting for better module isolation
README.md Comprehensive documentation of project structure and usage
.editorconfig Added consistent coding style configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

feat: add Jest configuration for testing with coverage reporting

chore: update package-lock.json to Rollup version 4.52.0 and related dependencies

fix: update linting scripts in package.json to use npm exec

refactor: improve warning handling in Rollup configuration

delete: remove unused rollup.config.ts file

fix: update tsconfig.test.json to reference jest.config.cjs
…ogger

- Added CoreLogger to wrap @actions/core logging functions.
- Introduced PinoLogger for structured logging with Pino.
- Created CompositeLogger to combine CoreLogger and PinoLogger.
- Implemented FilteredLogger to apply filtering and sampling strategies.
- Added MetricsLogger to collect logging metrics and telemetry.
- Developed MockLogger for testing purposes, capturing log calls.
- Introduced NoopLogger as a fallback when Pino initialization fails.
- Updated types and interfaces for logging, including ILogger and ILogMetadata.
- Enhanced TypeScript configuration with baseUrl and path mappings.
… configuration to disable JavaScript standard validation
@Coderrob Coderrob merged commit 99ee243 into main Sep 23, 2025
18 checks passed
@Coderrob Coderrob deleted the update-and-polish branch September 23, 2025 22:35
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