-
Notifications
You must be signed in to change notification settings - Fork 4
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
🪲 [Fix]: Consistant output generated with Set-GithubOutput
#314
Conversation
… Set-GitHubOutput.ps1
…s1 to handle non-string values
Module GitHub - 0.15.2-commands001 published to the PowerShell Gallery. |
GitHub release for GitHub v0.15.2-commands001 has been created. |
… to handle string normalization and non-string values
Module GitHub - 0.15.2-commands002 published to the PowerShell Gallery. |
GitHub release for GitHub v0.15.2-commands002 has been created. |
Module GitHub - 0.15.2-commands003 published to the PowerShell Gallery. |
GitHub release for GitHub v0.15.2-commands003 has been created. |
…ues to JSON format within GitHub composite actions
Module GitHub - 0.15.2-commands004 published to the PowerShell Gallery. |
GitHub release for GitHub v0.15.2-commands004 has been created. |
… and clean up whitespace in Set-GitHubOutput.ps1
Module GitHub - 0.15.2-commands005 published to the PowerShell Gallery. |
GitHub release for GitHub v0.15.2-commands005 has been created. |
Set-GithubOutput
Set-GithubOutput
Module GitHub - v0.15.2 published to the PowerShell Gallery. |
GitHub release for GitHub v0.15.2 has been created. |
Description
This pull request includes changes to improve the handling of JSON conversion and parameter attributes in PowerShell scripts. The most important changes include modifying how JSON strings are normalized, converting non-string values to JSON, and updating parameter attributes to support pipeline input.
Improvements to JSON handling:
src/functions/private/Commands/ConvertTo-GitHubOutput.ps1
: Added logic to normalize valid JSON strings to a consistent format and ensured non-string values are converted to JSON.src/functions/public/Commands/Set-GitHubOutput.ps1
: Removed redundant JSON conversion forHashtable
andPSCustomObject
types and added conversion for non-string values when running in a GitHub composite action. [1] [2]Parameter attribute updates:
src/functions/public/Commands/Set-GitHubStepSummary.ps1
: Updated theSummary
parameter to support pipeline input by adding theValueFromPipeline
attribute.Type of change
Checklist