-
-
Notifications
You must be signed in to change notification settings - Fork 2
💥 Rewrite for v4 #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
💥 Rewrite for v4 #120
Conversation
There was a problem hiding this 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 is a complete v4 architectural rewrite of the action-reporting-cli
, introducing a modular codebase, new CLI entry point, enhanced logging, caching, and pluggable report formats.
- Swapped out
index.js
for newcli.js
as entry point - Reorganized into
src/github/
,src/report/
, andsrc/util/
modules - Added Winston-based logging, persistent caching, and Jest tests
Reviewed Changes
Copilot reviewed 20 out of 54 changed files in this pull request and generated 7 comments.
Show a summary per file
File | Description |
---|---|
test/cli.test.js | Added placeholder tests for CLI help/version flags |
test/mocks/fs.js | Created an fs mock for node file operations |
src/util/log.js | New Log class implementing Winston and Ora |
src/util/cache.js | New Cache class for persistent API response caching |
src/report/reporter.js | Base Reporter class supporting multiple formats |
src/report/markdown.js | Markdown report generator with table and unique uses extraction |
src/github/owner.js | Owner class fetching repositories via GraphQL |
src/github/base.js | Base class initializing Octokit and logger |
package.json | Updated to v4, new exports field and updated dependencies |
Comments suppressed due to low confidence (2)
test/cli.test.js:10
- These tests are currently placeholders. Implement assertions for the
--help
and--version
flags to ensure CLI functionality is covered.
// TODO: Implement test logic
test/mocks/fs.js:2
- The file provides mocks for
fs/promises
methods, not input validation. Update the comment to accurately describe its purpose.
* Unit tests for input validation functions.
Note
This release represents a complete architectural rewrite of the
action-reporting-cli
with significant enhancements and breaking changes.💥 Breaking Changes
index.js
tocli.js
package.json
utils/
directory in favor of organizedsrc/
structure✨ New Features
Enhanced Logging System
🔊 Use warn logging more often
)Improved Caching
cache.js
Modular Architecture
User Experience
🧰 Technical Improvements
Code Organization
src/github/
: GitHub API interactionssrc/report/
: Report generation logicsrc/util/
: Utility functionsDocumentation
Testing Infrastructure
🐛 Bug Fixes
No specific bug fixes were included in this release as it's a complete rewrite.
🆙 Dependencies
Node Requirements
New Dependencies
ora
(v8.2.0) for terminal spinners and progress indicatorswinston
(v3.17.0) for advanced loggingUpdated Core Dependencies
@octokit/core
to v7.0.2@octokit/plugin-paginate-rest
to v13.1.0@octokit/plugin-throttling
to v11.0.1got
to v14.4.7csv
to v6.3.11meow
to v13.2.0normalize-url
to v8.0.2Updated Dev Dependencies
📊 File Statistics
index.js
,utils/reporting.js
,utils/wait.js
)🔄 Migration Guide
Users upgrading from v3.x will need to:
Update Node.js to version 20 or later and npm to version 10 or later
Update imports/requires to use the new module structure:
Review the updated CLI options and parameters
Update any code that directly uses the library's exports
See the documentation for detailed migration instructions.