Skip to content

🐛 fix(module): prepare branch for PR readiness - #192

Merged
SamErde merged 3 commits into
mainfrom
samerde/pr-readiness-review
May 11, 2026
Merged

🐛 fix(module): prepare branch for PR readiness#192
SamErde merged 3 commits into
mainfrom
samerde/pr-readiness-review

Conversation

@SamErde

@SamErde SamErde commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • remove aliases from FunctionsToExport and keep command aliases in AliasesToExport
  • update manifest automation and export tests to distinguish functions from command aliases
  • move the MkDocs navigation CI helper to .github/cicd-scripts
  • fix integration test cleanup to stay inside Pester lifecycle blocks

Validation

  • Test-ModuleManifest
  • changed-script parser checks
  • configured PSScriptAnalyzer checks
  • Invoke-Pester (244 passed, 0 failed, 3 skipped)
  • Invoke-Build -File .\src\PSPreworkout.build.ps1 BuildNoIntegration

Remove aliases from FunctionsToExport, keep command aliases in AliasesToExport, relocate the MkDocs CI helper under .github/cicd-scripts, and fix Pester export/integration checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 11, 2026 10:33
@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codacy-production

codacy-production Bot commented May 11, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 aligns the module manifest, tests, and CI automation around a clearer export contract: only real functions belong in FunctionsToExport, while command aliases belong exclusively in AliasesToExport. It also relocates the MkDocs navigation automation script into a CI-focused directory and tightens Pester lifecycle usage in an integration test.

Changes:

  • Updates manifest automation + tests to distinguish exported functions vs exported aliases (and validate aliases resolve to module commands).
  • Moves the MkDocs nav automation script to .github/cicd-scripts and updates workflows/tests/docs accordingly.
  • Fixes integration test cleanup by moving Remove-Module into AfterAll within the Pester lifecycle.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Tests/Unit/ExportedFunctions.Tests.ps1 Updates export validation to treat aliases separately and ensure aliases resolve to module functions.
src/Tests/Integration/SampleIntegrationTest.Tests.ps1 Moves module cleanup into AfterAll to stay within Pester lifecycle blocks.
src/PSPreworkout/PSPreworkout.psd1 Removes alias entries from FunctionsToExport; keeps them in AliasesToExport.
src/PSPreworkout.build.ps1 Updates manifest automation to extract function-level aliases via AST and export aliases only to AliasesToExport.
src/Draft/Update-MkDocsNavigation.Tests.ps1 Updates tests to point at the relocated MkDocs navigation script and reflect alias handling expectations.
Scripts/README.md Removes MkDocs navigation automation documentation from Scripts/ now that it’s CI-scoped elsewhere.
docs/MKDOCS-NAVIGATION-AUTOMATION.md Updates documentation to reference the new .github/cicd-scripts location and revised alias/export model.
.github/workflows/Validate Module Manifest.yml Updates alias extraction and validation rules so aliases are not allowed in FunctionsToExport.
.github/workflows/Update MkDocs Navigation.yml Runs the MkDocs navigation script from .github/cicd-scripts.
.github/CONTRIBUTING.md Documents the new convention: aliases should not be added to FunctionsToExport.
.github/cicd-scripts/Update-MkDocsNavigation.ps1 Updates script docs/logic to rely on FunctionsToExport containing only functions (no alias filtering list).
Comments suppressed due to low confidence (1)

src/Draft/Update-MkDocsNavigation.Tests.ps1:137

  • This test hard-codes a specific set of alias names to assert they are not categorized. Since the PR is moving toward treating aliases as data (AliasesToExport) rather than a fixed list, consider deriving the aliases from the manifest (e.g., Import-PowerShellDataFile and read AliasesToExport) to avoid the test becoming stale whenever aliases change.
        It 'should not categorize aliases from AliasesToExport' {
            if ($null -eq $categorized) {
                Set-ItResult -Skipped -Because "Manifest file not accessible in test environment"
                return
            }
            $allFunctions = $categorized['Customize'] + $categorized['Develop'] + $categorized['Daily Functions']
            $allFunctions | Should -Not -Contain 'Edit-HistoryFile'
            $allFunctions | Should -Not -Contain 'Get-Assembly'
            $allFunctions | Should -Not -Contain 'Get-PSPortable'
            $allFunctions | Should -Not -Contain 'Init-PSEnvConfig'
            $allFunctions | Should -Not -Contain 'New-Script'
            $allFunctions | Should -Not -Contain 'Show-LoadedAssemblies'
        }

Comment thread docs/MKDOCS-NAVIGATION-AUTOMATION.md
Move Update-MkDocsNavigation.Tests.ps1 from Draft into the Unit test suite and keep the CI helper dot-source safe for Pester.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread .github/cicd-scripts/Update-MkDocsNavigation.ps1 Fixed
Comment thread .github/cicd-scripts/Update-MkDocsNavigation.ps1 Fixed
Comment thread .github/cicd-scripts/Update-MkDocsNavigation.ps1 Fixed
Comment thread .github/cicd-scripts/Update-MkDocsNavigation.ps1 Fixed
Comment thread .github/cicd-scripts/Update-MkDocsNavigation.ps1 Fixed
Comment thread .github/cicd-scripts/Update-MkDocsNavigation.ps1 Fixed
Comment thread .github/cicd-scripts/Update-MkDocsNavigation.ps1 Fixed
Comment thread .github/cicd-scripts/Update-MkDocsNavigation.ps1 Fixed
Comment thread .github/cicd-scripts/Update-MkDocsNavigation.ps1 Fixed
Comment thread .github/cicd-scripts/Update-MkDocsNavigation.ps1 Fixed
Replace Write-Host usage with PowerShell information/error streams and adjust helper function names/ShouldProcess support to satisfy PSScriptAnalyzer without changing navigation behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SamErde
SamErde merged commit bdfcadc into main May 11, 2026
11 checks passed
@SamErde
SamErde deleted the samerde/pr-readiness-review branch May 11, 2026 10:56
@SamErde SamErde mentioned this pull request May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants