-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🩹 [Patch]: Streamline interaction between
Get-GitHubOutput
and `Con…
…vertFrom-GitHubOutput` (#256) ## Description This pull request primarily focuses on refactoring and simplifying the codebase. The most significant changes include modifications to the `ConvertFrom-GitHubOutput` function, removal of unnecessary debug code, and streamlining the `Set-GitHubLogGroup`, `Start-GitHubLogGroup`, and `Stop-GitHubLogGroup` functions. Refactoring and simplification: * [`src/functions/private/Commands/ConvertFrom-GitHubOutput.ps1`](diffhunk://#diff-932d91e541fddb09fdf24c5538bc3bff2f26aab6f4da41cb937c5a0b4bd53f99L23-R23): Refactored the function to use `OutputContent` instead of `InputData`, streamlined the processing logic, and improved debug messages for better clarity. [[1]](diffhunk://#diff-932d91e541fddb09fdf24c5538bc3bff2f26aab6f4da41cb937c5a0b4bd53f99L23-R23) [[2]](diffhunk://#diff-932d91e541fddb09fdf24c5538bc3bff2f26aab6f4da41cb937c5a0b4bd53f99L41-R43) [[3]](diffhunk://#diff-932d91e541fddb09fdf24c5538bc3bff2f26aab6f4da41cb937c5a0b4bd53f99L55-R87) [[4]](diffhunk://#diff-932d91e541fddb09fdf24c5538bc3bff2f26aab6f4da41cb937c5a0b4bd53f99L102-R131) [[5]](diffhunk://#diff-932d91e541fddb09fdf24c5538bc3bff2f26aab6f4da41cb937c5a0b4bd53f99L142-R148) * [`src/functions/public/Commands/Get-GitHubOutput.ps1`](diffhunk://#diff-7a9d9dc46c69778a8be116cb790362a94df6c76355c4575c5d195537097f4676L59-R60): Simplified the function by using the `-Raw` parameter with `Get-Content` and directly passing the content to `ConvertFrom-GitHubOutput`. Removal of unnecessary debug code: * [`src/functions/public/Commands/Set-GitHubLogGroup.ps1`](diffhunk://#diff-18916321a4a96d2ef4e5dc8a43ef587452e3e04092aff724e60cae7b9d532f98L43-L60): Removed the `begin`, `process`, and `end` blocks and unnecessary debug messages, simplifying the function to directly use `Write-Host`. * [`src/functions/public/Commands/Start-GitHubLogGroup.ps1`](diffhunk://#diff-868454a7517a8963907fdde37442352a7ec723ff0b1952de42de95a9310423b9L30-L45): Removed unnecessary debug messages and the `begin`, `process`, and `end` blocks, simplifying the function to directly use `Write-Host`. * [`src/functions/public/Commands/Stop-GitHubLogGroup.ps1`](diffhunk://#diff-c2da82ea54497efb40d18798f4e8875747350804657ebe269d26102d1ce61a97L26-L41): Removed unnecessary debug messages and the `begin`, `process`, and `end` blocks, simplifying the function to directly use `Write-Host`. Minor adjustments: * [`src/formats/GitHubContext.Format.ps1xml`](diffhunk://#diff-c7dd80cd4c4440ccbe24930842a2e172614dbfd79d31393d68852200eacc2c74R56-R58): Added `Name` property and removed `ID` property from the list entries. [[1]](diffhunk://#diff-c7dd80cd4c4440ccbe24930842a2e172614dbfd79d31393d68852200eacc2c74R56-R58) [[2]](diffhunk://#diff-c7dd80cd4c4440ccbe24930842a2e172614dbfd79d31393d68852200eacc2c74L98-L100) ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
- Loading branch information
1 parent
ccc9d37
commit 6ca1d3b
Showing
6 changed files
with
50 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters