-
Notifications
You must be signed in to change notification settings - Fork 412
Use Actions logger in API client #3249
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
Conversation
This allows us to remove the `console-log-level` dependency.
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 replaces the console-log-level logger with the native @actions/core logger in the API client, allowing the removal of the console-log-level dependency. Additionally, the PR improves the check-node-modules.sh script to handle more installation scenarios.
Key changes:
- Switched from
console-log-levelto@actions/corefor Octokit logging - Removed the
console-log-leveldependency from package.json - Enhanced the
check-node-modules.shscript with additional checks
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/api-client.ts | Replaced console-log-level logger with Actions core logger using spread syntax and aliased warn to core.warning |
| package.json | Removed console-log-level dependency |
| scripts/check-node-modules.sh | Added checks for missing node_modules, outdated package.json, and improved messaging |
| lib/*.js (multiple files) | Generated JavaScript files reflecting the TypeScript changes and dependency removal |
| log: { | ||
| ...core, | ||
| warn: core.warning, | ||
| }, |
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.
Minor: it might be good to set all the properties explicitly rather than include the entire core object, in case it ever changes. We'd probably want to know if that happens.
This allows us to remove the
console-log-leveldependency.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
analysis-kinds: code-scanning).analysis-kinds: code-quality).upload-sarif).How did/will you validate this change?
.test.tsfiles).pr-checks).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Merge / deployment checklist