-
Notifications
You must be signed in to change notification settings - Fork 20
Log action outputs as a table #180
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
Semantic Version Check Passed ✅Version in manifest file This comment will be automatically updated as changes are pushed to this PR branch. |
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 adds enhanced logging at the end of a local action run by outputting any set action outputs in a formatted table, or displaying a message if none were set.
- Updates the setOutput function to convert non-string values and skip outputs containing secrets.
- Adds a table-based log output for action outputs in the action runner.
- Extends tests to verify conversion behavior and secret filtering for outputs.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/stubs/core/core.ts | Updates setOutput to handle various value types and secret filtering. |
| src/commands/run.ts | Adds logic to display action outputs as a formatted table in the console. |
| tests/stubs/core/core.test.ts | Adds tests verifying output conversion and secret filtering in setOutput. |
Files not reviewed (1)
- package.json: Language not supported
Comments suppressed due to low confidence (1)
src/commands/run.ts:392
- [nitpick] The variable name 'i' is ambiguous; consider renaming it to 'outputName' for improved clarity.
Object.keys(CoreMeta.outputs).map(i => ({
🦙 MegaLinter status: ❌ ERROR
See detailed report in MegaLinter reports |
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 adds enhanced logging at the end of the action run to display any outputs set via setOutput, formatting them into a table when present and showing a default message otherwise.
- Updated setOutput in core.ts to handle values of various types and to convert non-string values.
- Updated run.ts to log outputs using console.table when outputs exist.
- Expanded tests in core.test.ts to cover multiple output types and validate secret filtering behavior.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/stubs/core/core.ts | Modified setOutput to convert non-string values and skip outputs containing secrets. |
| src/commands/run.ts | Added console logging to display action outputs in a table format. |
| tests/stubs/core/core.test.ts | Added tests to cover various output types and verify secret output behavior. |
Files not reviewed (1)
- package.json: Language not supported

This PR adds some additional logging at the end of the local action run. If any outputs were created via the
setOutputmethod of@actions/core, they will be logged in a table following the completion of the run.If no outputs were set, a relevant message will appear.
The output logic attempts to stringify any value passed to the
setOutputfunction.