From 57f34e3a4727bc539496e131ee4ebd2668efee7e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Aug 2026 02:26:11 +0000 Subject: [PATCH 1/7] Initial plan From e5a3562e17159279a67b5e3c178eec97e04a6b71 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Aug 2026 02:28:08 +0000 Subject: [PATCH 2/7] Make placeholder module called Yml --- README.md | 23 ++----------- examples/General.ps1 | 4 +-- src/functions/public/ConvertTo-Yaml.ps1 | 33 +++++++++++++++++++ src/functions/public/Get-PSModuleTest.ps1 | 33 ------------------- .../{PSModuleTest.Tests.ps1 => Yml.Tests.ps1} | 4 +-- 5 files changed, 40 insertions(+), 57 deletions(-) create mode 100644 src/functions/public/ConvertTo-Yaml.ps1 delete mode 100644 src/functions/public/Get-PSModuleTest.ps1 rename tests/{PSModuleTest.Tests.ps1 => Yml.Tests.ps1} (74%) diff --git a/README.md b/README.md index 9cfd27d..8aedc5f 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,6 @@ -# Template-PSModule +# Yml -The canonical starting template for new PowerShell modules in the PSModule organization. - -## Purpose - -Use this template when creating a new PowerShell module repository. -It provides the CI/CD framework wiring, required community files, and starter layout that every PSModule module repository needs. - -For step-by-step instructions, see the [template quickstart](https://psmodule.github.io/docs/Modules/Process-PSModule/template-quickstart/). - -## After creating a repository from this template - -1. Replace the `{{ NAME }}` placeholder with your module name throughout the repository. -2. Replace the starter function, test, and example with your module's first real command. -3. Set the repository description and custom properties on GitHub. -4. Confirm `.github/PSModule.yml` only overrides defaults when your module needs different behavior. -5. Open a draft pull request and run the full CI pipeline. - -See [repository defaults](https://psmodule.github.io/docs/Modules/Repository-Defaults/) for the full checklist. +A PowerShell module for working with YAML files and data. ## Prerequisites @@ -25,5 +8,5 @@ Modules built from this template use the [PSModule framework](https://github.com ## Contributing -To contribute to this template itself, read the [Contribution guidelines](CONTRIBUTING.md). +Read the [Contribution guidelines](CONTRIBUTING.md). For agents and AI tools, start with [`AGENTS.md`](AGENTS.md). diff --git a/examples/General.ps1 b/examples/General.ps1 index 79d4f26..25ebc75 100644 --- a/examples/General.ps1 +++ b/examples/General.ps1 @@ -3,5 +3,5 @@ Basic module usage example. #> -Import-Module -Name '{{ NAME }}' -Get-PSModuleTest -Name 'World' +Import-Module -Name 'Yml' +ConvertTo-Yaml -InputObject @{ Name = 'World' } diff --git a/src/functions/public/ConvertTo-Yaml.ps1 b/src/functions/public/ConvertTo-Yaml.ps1 new file mode 100644 index 0000000..e5e7800 --- /dev/null +++ b/src/functions/public/ConvertTo-Yaml.ps1 @@ -0,0 +1,33 @@ +function ConvertTo-Yaml { + <# + .SYNOPSIS + Converts a PowerShell object to a YAML string. + + .DESCRIPTION + Converts a PowerShell object to a YAML-formatted string. + This is a placeholder function. Full implementation is pending. + + .EXAMPLE + ConvertTo-Yaml -InputObject @{ Name = 'World' } + + Name: World + + .INPUTS + System.Object + + You can pipe any object to this function. + + .OUTPUTS + System.String + + A YAML-formatted string representation of the input object. + #> + [OutputType([string])] + [CmdletBinding()] + param ( + # The object to convert to YAML. + [Parameter(Mandatory, ValueFromPipeline)] + [object] $InputObject + ) + throw [System.NotImplementedException] 'ConvertTo-Yaml is not yet implemented.' +} diff --git a/src/functions/public/Get-PSModuleTest.ps1 b/src/functions/public/Get-PSModuleTest.ps1 deleted file mode 100644 index 3043abd..0000000 --- a/src/functions/public/Get-PSModuleTest.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -function Get-PSModuleTest { - <# - .SYNOPSIS - Greets an entity by name. - - .DESCRIPTION - Returns a greeting string for the given name. - This is a scaffold example function. Replace it with your module's first real command. - - .EXAMPLE - Get-PSModuleTest -Name 'World' - - Hello, World! - - .INPUTS - None - - You cannot pipe objects to this function. - - .OUTPUTS - System.String - - A greeting string for the given name. - #> - [OutputType([string])] - [CmdletBinding()] - param ( - # The name of the entity to greet. - [Parameter(Mandatory)] - [string] $Name - ) - "Hello, $Name!" -} diff --git a/tests/PSModuleTest.Tests.ps1 b/tests/Yml.Tests.ps1 similarity index 74% rename from tests/PSModuleTest.Tests.ps1 rename to tests/Yml.Tests.ps1 index ff69bb3..95d9e7f 100644 --- a/tests/PSModuleTest.Tests.ps1 +++ b/tests/Yml.Tests.ps1 @@ -12,7 +12,7 @@ param() Describe 'Module' { - It 'Function: Get-PSModuleTest' { - Get-PSModuleTest -Name 'World' | Should -Be 'Hello, World!' + It 'Function: ConvertTo-Yaml - is a placeholder and throws NotImplementedException' { + { ConvertTo-Yaml -InputObject @{} } | Should -Throw } } From e5087e6ea04e56e218a280e2a2dba2482ac41d2a Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Aug 2026 04:33:21 +0200 Subject: [PATCH 3/7] Bump Process-PSModule to v6.1.16 (#3) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- .github/workflows/Process-PSModule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Process-PSModule.yml b/.github/workflows/Process-PSModule.yml index aebc8ed..75a426b 100644 --- a/.github/workflows/Process-PSModule.yml +++ b/.github/workflows/Process-PSModule.yml @@ -27,6 +27,6 @@ permissions: jobs: Process-PSModule: - uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@fb1bdb8fefd243292f779d2a856a38db6fe6daf4 # v6.1.13 + uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@1653be8d36607d9535f600278c44789979477813 # v6.1.16 secrets: APIKey: ${{ secrets.APIKEY }} From 993351b2fc16a7afce1c5a4e8d415a1d8c5fbfe0 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Aug 2026 04:36:00 +0200 Subject: [PATCH 4/7] yaml -> yml --- .../public/{ConvertTo-Yaml.ps1 => ConvertTo-Yml.ps1} | 6 +++--- tests/Yml.Tests.ps1 | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/functions/public/{ConvertTo-Yaml.ps1 => ConvertTo-Yml.ps1} (80%) diff --git a/src/functions/public/ConvertTo-Yaml.ps1 b/src/functions/public/ConvertTo-Yml.ps1 similarity index 80% rename from src/functions/public/ConvertTo-Yaml.ps1 rename to src/functions/public/ConvertTo-Yml.ps1 index e5e7800..b295268 100644 --- a/src/functions/public/ConvertTo-Yaml.ps1 +++ b/src/functions/public/ConvertTo-Yml.ps1 @@ -1,4 +1,4 @@ -function ConvertTo-Yaml { +function ConvertTo-Yml { <# .SYNOPSIS Converts a PowerShell object to a YAML string. @@ -8,7 +8,7 @@ function ConvertTo-Yaml { This is a placeholder function. Full implementation is pending. .EXAMPLE - ConvertTo-Yaml -InputObject @{ Name = 'World' } + ConvertTo-Yml -InputObject @{ Name = 'World' } Name: World @@ -29,5 +29,5 @@ function ConvertTo-Yaml { [Parameter(Mandatory, ValueFromPipeline)] [object] $InputObject ) - throw [System.NotImplementedException] 'ConvertTo-Yaml is not yet implemented.' + throw [System.NotImplementedException] 'ConvertTo-Yml is not yet implemented.' } diff --git a/tests/Yml.Tests.ps1 b/tests/Yml.Tests.ps1 index 95d9e7f..9cba733 100644 --- a/tests/Yml.Tests.ps1 +++ b/tests/Yml.Tests.ps1 @@ -13,6 +13,6 @@ param() Describe 'Module' { It 'Function: ConvertTo-Yaml - is a placeholder and throws NotImplementedException' { - { ConvertTo-Yaml -InputObject @{} } | Should -Throw + { ConvertTo-Yml -InputObject @{} } | Should -Throw } } From fee81c05f446cb85db5e99daa63627ddbd0eddcb Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Aug 2026 04:36:29 +0200 Subject: [PATCH 5/7] fix --- tests/Yml.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Yml.Tests.ps1 b/tests/Yml.Tests.ps1 index 9cba733..61cc240 100644 --- a/tests/Yml.Tests.ps1 +++ b/tests/Yml.Tests.ps1 @@ -12,7 +12,7 @@ param() Describe 'Module' { - It 'Function: ConvertTo-Yaml - is a placeholder and throws NotImplementedException' { + It 'Function: ConvertTo-Yml - is a placeholder and throws NotImplementedException' { { ConvertTo-Yml -InputObject @{} } | Should -Throw } } From a12c675c403107f80cac4c78745c6476e0b40246 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Aug 2026 04:44:04 +0200 Subject: [PATCH 6/7] fix(ConvertTo-Yml): satisfy PSScriptAnalyzer and PublicHelpLink tests - Add a process block so the pipeline-enabled function satisfies PSUseProcessBlockForPipelineCommand. - Reference $InputObject inside the process block to satisfy PSReviewUnusedParameter. - Add the canonical documentation link .LINK https://psmodule.io/Yml/Functions/ConvertTo-Yml/ so the PublicHelpLink test passes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/functions/public/ConvertTo-Yml.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/functions/public/ConvertTo-Yml.ps1 b/src/functions/public/ConvertTo-Yml.ps1 index b295268..22d82b0 100644 --- a/src/functions/public/ConvertTo-Yml.ps1 +++ b/src/functions/public/ConvertTo-Yml.ps1 @@ -7,6 +7,9 @@ function ConvertTo-Yml { Converts a PowerShell object to a YAML-formatted string. This is a placeholder function. Full implementation is pending. + .LINK + https://psmodule.io/Yml/Functions/ConvertTo-Yml/ + .EXAMPLE ConvertTo-Yml -InputObject @{ Name = 'World' } @@ -29,5 +32,8 @@ function ConvertTo-Yml { [Parameter(Mandatory, ValueFromPipeline)] [object] $InputObject ) - throw [System.NotImplementedException] 'ConvertTo-Yml is not yet implemented.' + process { + $null = $InputObject + throw [System.NotImplementedException] 'ConvertTo-Yml is not yet implemented.' + } } From 14f4807096d6698bf6e167c6b24b706092544179 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Aug 2026 04:44:08 +0200 Subject: [PATCH 7/7] fix(General.ps1): use correct ConvertTo-Yml command name Updates the example to call the actual public function ConvertTo-Yml instead of ConvertTo-Yaml. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- examples/General.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/General.ps1 b/examples/General.ps1 index 25ebc75..672d81d 100644 --- a/examples/General.ps1 +++ b/examples/General.ps1 @@ -4,4 +4,4 @@ #> Import-Module -Name 'Yml' -ConvertTo-Yaml -InputObject @{ Name = 'World' } +ConvertTo-Yml -InputObject @{ Name = 'World' }