From fd22bd82fc3bcbf0b2098534c9fe9b8eb1860d3d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Fri, 14 Feb 2025 07:35:49 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Remove=20automati?= =?UTF-8?q?c=20documentation=20commit=20from=20CI=20workflows=20and=20enha?= =?UTF-8?q?nce=20module=20test=20description?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 5 ----- .github/workflows/workflow.yml | 5 ----- .../src/functions/public/Test-PSModuleTest.ps1 | 2 +- tests/srcTestRepo/src/functions/public/completers.ps1 | 8 ++++++++ .../src/functions/public/Test-PSModuleTest.ps1 | 6 ++---- 5 files changed, 11 insertions(+), 15 deletions(-) create mode 100644 tests/srcTestRepo/src/functions/public/completers.ps1 diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 29cde5cc..221c5ab3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -259,11 +259,6 @@ jobs: Verbose: ${{ inputs.Verbose }} Version: ${{ inputs.Version }} - - name: Commit all changes - run: | - git add . - git commit -m 'Update documentation' - - name: Lint documentation uses: super-linter/super-linter/slim@latest env: diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 410439a8..89e6409c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -266,11 +266,6 @@ jobs: Verbose: ${{ inputs.Verbose }} Version: ${{ inputs.Version }} - - name: Commit all changes - run: | - git add . - git commit -m 'Update documentation' - - name: Lint documentation uses: super-linter/super-linter/slim@latest env: diff --git a/tests/srcTestRepo/src/functions/public/Test-PSModuleTest.ps1 b/tests/srcTestRepo/src/functions/public/Test-PSModuleTest.ps1 index 26be2b9b..4f05ada3 100644 --- a/tests/srcTestRepo/src/functions/public/Test-PSModuleTest.ps1 +++ b/tests/srcTestRepo/src/functions/public/Test-PSModuleTest.ps1 @@ -1,7 +1,7 @@ function Test-PSModuleTest { <# .SYNOPSIS - Performs tests on a module. + Performs tests on a module. Api, url, and file name. .EXAMPLE Test-PSModule -Name 'World' diff --git a/tests/srcTestRepo/src/functions/public/completers.ps1 b/tests/srcTestRepo/src/functions/public/completers.ps1 new file mode 100644 index 00000000..6b1adbb7 --- /dev/null +++ b/tests/srcTestRepo/src/functions/public/completers.ps1 @@ -0,0 +1,8 @@ +Register-ArgumentCompleter -CommandName New-PSModuleTest -ParameterName Name -ScriptBlock { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + $null = $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters + + 'Alice', 'Bob', 'Charlie' | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object { + [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) + } +} diff --git a/tests/srcWithManifestTestRepo/src/functions/public/Test-PSModuleTest.ps1 b/tests/srcWithManifestTestRepo/src/functions/public/Test-PSModuleTest.ps1 index 4056e2f6..4f05ada3 100644 --- a/tests/srcWithManifestTestRepo/src/functions/public/Test-PSModuleTest.ps1 +++ b/tests/srcWithManifestTestRepo/src/functions/public/Test-PSModuleTest.ps1 @@ -1,8 +1,7 @@ -#SkipTest:Verbose:Just want to test that a function can have multiple skips. -function Test-PSModuleTest { +function Test-PSModuleTest { <# .SYNOPSIS - Performs tests on a module. + Performs tests on a module. Api, url, and file name. .EXAMPLE Test-PSModule -Name 'World' @@ -16,5 +15,4 @@ function Test-PSModuleTest { [string] $Name ) Write-Output "Hello, $Name!" - Write-Verbose 'Verbose message' -Verbose } From 05a60e128a4503ce2e996a7b293c7b787018efb4 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Fri, 14 Feb 2025 07:48:09 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Add=20automatic?= =?UTF-8?q?=20documentation=20commit=20step=20in=20CI=20workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 6 ++++++ .github/workflows/workflow.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 221c5ab3..9c01f58b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -259,6 +259,12 @@ jobs: Verbose: ${{ inputs.Verbose }} Version: ${{ inputs.Version }} + - name: Commit all changes + continue-on-error: true + run: | + git add . + git commit -m 'Update documentation' + - name: Lint documentation uses: super-linter/super-linter/slim@latest env: diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 89e6409c..29082b16 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -266,6 +266,12 @@ jobs: Verbose: ${{ inputs.Verbose }} Version: ${{ inputs.Version }} + - name: Commit all changes + continue-on-error: true + run: | + git add . + git commit -m 'Update documentation' + - name: Lint documentation uses: super-linter/super-linter/slim@latest env: From 80d7c6b91e3a2c126094ab031f6aad21225734ff Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Fri, 14 Feb 2025 07:53:28 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Simplify=20module?= =?UTF-8?q?=20test=20synopsis=20in=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/srcTestRepo/src/functions/public/Test-PSModuleTest.ps1 | 2 +- .../src/functions/public/Test-PSModuleTest.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/srcTestRepo/src/functions/public/Test-PSModuleTest.ps1 b/tests/srcTestRepo/src/functions/public/Test-PSModuleTest.ps1 index 4f05ada3..26be2b9b 100644 --- a/tests/srcTestRepo/src/functions/public/Test-PSModuleTest.ps1 +++ b/tests/srcTestRepo/src/functions/public/Test-PSModuleTest.ps1 @@ -1,7 +1,7 @@ function Test-PSModuleTest { <# .SYNOPSIS - Performs tests on a module. Api, url, and file name. + Performs tests on a module. .EXAMPLE Test-PSModule -Name 'World' diff --git a/tests/srcWithManifestTestRepo/src/functions/public/Test-PSModuleTest.ps1 b/tests/srcWithManifestTestRepo/src/functions/public/Test-PSModuleTest.ps1 index 4f05ada3..26be2b9b 100644 --- a/tests/srcWithManifestTestRepo/src/functions/public/Test-PSModuleTest.ps1 +++ b/tests/srcWithManifestTestRepo/src/functions/public/Test-PSModuleTest.ps1 @@ -1,7 +1,7 @@ function Test-PSModuleTest { <# .SYNOPSIS - Performs tests on a module. Api, url, and file name. + Performs tests on a module. .EXAMPLE Test-PSModule -Name 'World' From b9e6e89d53595c4908a3d4a3663152b35943ae5d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Fri, 14 Feb 2025 08:02:36 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Modify=20CI=20wor?= =?UTF-8?q?kflows=20to=20temporarily=20rename=20.gitignore=20during=20docu?= =?UTF-8?q?mentation=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 7 +++++++ .github/workflows/workflow.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9c01f58b..c881f7da 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -261,10 +261,17 @@ jobs: - name: Commit all changes continue-on-error: true + shell: pwsh run: | + # Rename the gitignore file to .gitignore.bak + Rename-Item -Path '.gitignore' -NewName '.gitignore.bak' -Force + git add . git commit -m 'Update documentation' + # Restore the gitignore file + Rename-Item -Path '.gitignore.bak' -NewName '.gitignore' -Force + - name: Lint documentation uses: super-linter/super-linter/slim@latest env: diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 29082b16..24be9dff 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -268,10 +268,17 @@ jobs: - name: Commit all changes continue-on-error: true + shell: pwsh run: | + # Rename the gitignore file to .gitignore.bak + Rename-Item -Path '.gitignore' -NewName '.gitignore.bak' -Force + git add . git commit -m 'Update documentation' + # Restore the gitignore file + Rename-Item -Path '.gitignore.bak' -NewName '.gitignore' -Force + - name: Lint documentation uses: super-linter/super-linter/slim@latest env: