Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4bd8efa
🩹 [Patch]: Clear super-linter summary after successful runs
MariusStorhaug Oct 7, 2025
80de5d1
Update .github/workflows/workflow.yml
MariusStorhaug Oct 7, 2025
adba801
Remove obsolete PowerShell scripts and templates for feature management
MariusStorhaug Oct 7, 2025
5a587d9
🩹 [Refactor]: Replace Write-Host with Write-Warning in BeforeAll and …
MariusStorhaug Oct 7, 2025
831d230
🩹 [Patch]: Update super-linter summary clearing method for improved c…
MariusStorhaug Oct 7, 2025
e212b33
🩹 [Refactor]: Simplify super-linter summary clearing method by using …
MariusStorhaug Oct 7, 2025
06f46e6
🩹 [Refactor]: Update super-linter summary clearing method to use Out-…
MariusStorhaug Oct 7, 2025
4b980c8
🩹 [Refactor]: Enhance super-linter integration by posting summary on …
MariusStorhaug Oct 7, 2025
f79dd93
🩹 [Refactor]: Add super-linter summary generation on failure to impro…
MariusStorhaug Oct 7, 2025
89c17c6
🩹 [Refactor]: Remove redundant job failure step for super-linter to s…
MariusStorhaug Oct 7, 2025
f5f907c
🩹 [Refactor]: Specify shell type for super-linter summary generation …
MariusStorhaug Oct 7, 2025
cdade77
feat: Add PowerShell scripts for feature management and implementatio…
MariusStorhaug Oct 7, 2025
5406c1e
feat: Add PowerShell scripts for feature management and implementatio…
MariusStorhaug Oct 8, 2025
dcdee40
🩹 [Refactor]: Remove continue-on-error from super-linter step to enfo…
MariusStorhaug Oct 8, 2025
d5e847c
🩹 [Refactor]: Update PSModule.yml to uncomment Skip option and ensure…
MariusStorhaug Oct 8, 2025
b87d817
🩹 [Refactor]: Remove continue-on-error from super-linter step for str…
MariusStorhaug Oct 8, 2025
6ca23d6
🩹 [Refactor]: Clean up README.md by removing duplicate header; update…
MariusStorhaug Oct 8, 2025
9d8f13d
feat: Add DEFAULT_WORKSPACE input to super-linter step for improved w…
MariusStorhaug Oct 8, 2025
cc867bb
feat: Update default input for repo path to use github.workspace for …
MariusStorhaug Oct 8, 2025
4daf0d6
fix: Update default WorkingDirectory input to '.' for improved compat…
MariusStorhaug Oct 8, 2025
97bc571
feat: Update super-linter configuration to use WorkingDirectory input…
MariusStorhaug Oct 8, 2025
4e0ce7d
fix: Update FILTER_REGEX_INCLUDE to use WorkingDirectory for accurate…
MariusStorhaug Oct 8, 2025
aa64e91
fix: Remove duplicate header in README.md for clarity
MariusStorhaug Oct 8, 2025
cca2705
fix: Update module description to clarify purpose and include bug fix…
MariusStorhaug Oct 8, 2025
fa6c4f2
fix: Remove bug fix note from module description for clarity
MariusStorhaug Oct 8, 2025
2026336
Update README.md
MariusStorhaug Oct 8, 2025
440affe
fix: Add header to GitHub Copilot instructions and remove obsolete pr…
MariusStorhaug Oct 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# GitHub Copilot Instructions for Process-PSModule

## Terminal Commands

When executing terminal commands (using `run_in_terminal` or similar tools):
Expand Down
9 changes: 5 additions & 4 deletions .github/prompts/pr.prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ $ARGUMENTS

## Execution Steps

0. Change directory to the repository root if not already there.
0. If a folder is **explicitly attached to this chat** (“references”), you **must** change directory to the root of the git folder it is in. If there are no git folders you can change to the provided folder.

1. **Detect repository mode**:
- Run `git remote -v` to check configured remotes.
- **If `upstream` remote exists**: Fork mode
Expand Down Expand Up @@ -133,9 +134,9 @@ $ARGUMENTS
- Set PR to target the default branch (main/master) of the target repository
- Open as a **draft PR** (or keep as draft if updating)
- **Use GitHub MCP tools** to perform these operations in the **target repository**:
- Create PR (if not exists) - owner/repo should be target repository, use `mcp_github_github_create_pull_request`
- Update PR (if exists) - owner/repo should be target repository, use `mcp_github_github_update_pull_request`
- Add labels to PR - owner/repo should be target repository, use `mcp_github_github_add_labels_to_issue` (PRs are issues in GitHub API)
- Create PR (if not exists) - owner/repo should be target repository, use `create_pull_request`
- Update PR (if exists) - owner/repo should be target repository, use `update_pull_request`
- Add labels to PR - owner/repo should be target repository, use `update_issue` (PRs are issues in GitHub API)

8. **Apply labels to the PR**:
- Add the **change type label** based on the type specified (Major, Minor, Patch, Fix, or Docs)
Expand Down
25 changes: 23 additions & 2 deletions .github/workflows/Build-Docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
description: The working directory where the script will run from.
required: false
default: '.'
ShowSummaryOnSuccess:
type: boolean
description: Whether to show the super-linter summary on success.
required: false
default: false

permissions:
contents: read # to checkout the repo
Expand Down Expand Up @@ -96,14 +101,15 @@ jobs:
}

- name: Lint documentation
id: super-linter
uses: super-linter/super-linter/slim@7bba2eeb89d01dc9bfd93c497477a57e72c83240 # v8.2.0
env:
FILTER_REGEX_INCLUDE: outputs/docs
RUN_LOCAL: true
DEFAULT_BRANCH: main
DEFAULT_WORKSPACE: ${{ inputs.WorkingDirectory }}
FILTER_REGEX_INCLUDE: ${{ inputs.WorkingDirectory }}/outputs/docs
ENABLE_GITHUB_ACTIONS_GROUP_TITLE: true
GITHUB_TOKEN: ${{ github.token }}
RUN_LOCAL: true
VALIDATE_ALL_CODEBASE: true
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
Expand All @@ -113,3 +119,18 @@ jobs:
VALIDATE_JSON_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: false
SAVE_SUPER_LINTER_SUMMARY: true

- name: Post super-linter summary
if: failure() || inputs.ShowSummaryOnSuccess == true
shell: pwsh
run: |
$summaryPath = Join-Path $env:GITHUB_WORKSPACE 'super-linter-output' 'super-linter-summary.md'
Get-Content $summaryPath | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8

$failed = '${{ steps.super-linter.outcome }}' -eq 'failure'
if ($failed) {
Write-Host "::error::Super-linter found issues. Please review the summary above."
exit 1
}
8 changes: 5 additions & 3 deletions .github/workflows/Get-Settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ jobs:
Skip = $settings.Build.Module.Skip ?? $false
}
Docs = [pscustomobject]@{
Skip = $settings.Build.Docs.Skip ?? $false
Skip = $settings.Build.Docs.Skip ?? $false
ShowSummaryOnSuccess = $settings.Build.Docs.ShowSummaryOnSuccess ?? $false
}
Site = [pscustomobject]@{
Skip = $settings.Build.Site.Skip ?? $false
Expand All @@ -231,8 +232,9 @@ jobs:

}
Linter = [pscustomobject]@{
Skip = $settings.Linter.Skip ?? $false
env = $settings.Linter.env ?? @{}
Skip = $settings.Linter.Skip ?? $false
ShowSummaryOnSuccess = $settings.Linter.ShowSummaryOnSuccess ?? $false
env = $settings.Linter.env ?? @{}
}
}
LogGroup "Final settings" {
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,27 @@ jobs:
}

- name: Lint code base
id: super-linter
uses: super-linter/super-linter@7bba2eeb89d01dc9bfd93c497477a57e72c83240 # v8.2.0
env:
GITHUB_TOKEN: ${{ github.token }}
DEFAULT_WORKSPACE: ${{ inputs.WorkingDirectory }}
FILTER_REGEX_INCLUDE: ${{ inputs.WorkingDirectory }}
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: false
SAVE_SUPER_LINTER_SUMMARY: true

- name: Post super-linter summary
if: failure() || fromJson(needs.Get-Settings.outputs.Settings).Linter.ShowSummaryOnSuccess == true
shell: pwsh
run: |
$summaryPath = Join-Path $env:GITHUB_WORKSPACE 'super-linter-output' 'super-linter-summary.md'
Get-Content $summaryPath | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8

$failed = '${{ steps.super-linter.outcome }}' -eq 'failure'
if ($failed) {
Write-Host "::error::Super-linter found issues. Please review the summary above."
exit 1
}

# Runs on:
# - ✅ Open/Updated PR - Builds module for testing
Expand Down Expand Up @@ -168,6 +186,7 @@ jobs:
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
ShowSummaryOnSuccess: ${{ fromJson(needs.Get-Settings.outputs.Settings).Build.Docs.ShowSummaryOnSuccess }}

# Runs on:
# - ✅ Open/Updated PR - Builds site for preview
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ The following settings are available in the settings file:
| `Build.Skip` | `Boolean` | Skip all build tasks | `false` |
| `Build.Module.Skip` | `Boolean` | Skip module build | `false` |
| `Build.Docs.Skip` | `Boolean` | Skip documentation build | `false` |
| `Build.Docs.ShowSummaryOnSuccess` | `Boolean` | Show super-linter summary on success for documentation linting | `false` |
| `Build.Site.Skip` | `Boolean` | Skip site build | `false` |
| `Publish.Module.Skip` | `Boolean` | Skip module publishing | `false` |
| `Publish.Module.AutoCleanup` | `Boolean` | Automatically cleanup old prerelease module versions | `true` |
Expand All @@ -261,6 +262,7 @@ The following settings are available in the settings file:
| `Publish.Module.PatchLabels` | `String` | Labels indicating a patch version bump | `'patch, fix'` |
| `Publish.Module.IgnoreLabels` | `String` | Labels indicating no release | `'NoRelease'` |
| `Linter.Skip` | `Boolean` | Skip repository linting | `false` |
| `Linter.ShowSummaryOnSuccess` | `Boolean` | Show super-linter summary on success for repository linting | `false` |
| `Linter.env` | `Object` | Environment variables for super-linter configuration | `{}` |

<details>
Expand All @@ -275,6 +277,7 @@ Build:
Skip: false
Docs:
Skip: false
ShowSummaryOnSuccess: false
Site:
Skip: false

Expand Down Expand Up @@ -332,6 +335,7 @@ Publish:

Linter:
Skip: false
ShowSummaryOnSuccess: false
env: {}

```
Expand Down Expand Up @@ -419,6 +423,17 @@ Linter:
VALIDATE_ALL_CODEBASE: false
```

#### Showing Linter Summary on Success

By default, the linter only shows a summary when it finds issues. You can enable summary display on successful runs:

```yaml
Linter:
ShowSummaryOnSuccess: true
```

This is useful for reviewing what was checked even when no issues are found.

**Note:** The `GITHUB_TOKEN` is automatically provided by the workflow to enable status updates in pull requests.

For a complete list of available environment variables and configuration options, see the
Expand Down
8 changes: 4 additions & 4 deletions tests/srcTestRepo/tests/AfterAll.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Write-Host "=== AFTERALL TEARDOWN SCRIPT EXECUTING ==="
Write-Host "Tearing down test environment..."
Write-Warning "=== AFTERALL TEARDOWN SCRIPT EXECUTING ==="
Write-Warning "Tearing down test environment..."

# Example teardown tasks:
# - Clean up test infrastructure
Expand All @@ -8,5 +8,5 @@ Write-Host "Tearing down test environment..."
# - Drop test databases
# - Stop test services

Write-Host "Test environment teardown completed successfully!"
Write-Host "=== AFTERALL TEARDOWN SCRIPT COMPLETED ==="
Write-Warning "Test environment teardown completed successfully!"
Write-Warning "=== AFTERALL TEARDOWN SCRIPT COMPLETED ==="
8 changes: 4 additions & 4 deletions tests/srcTestRepo/tests/BeforeAll.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Write-Host "=== BEFOREALL SETUP SCRIPT EXECUTING ==="
Write-Host "Setting up test environment..."
Write-Warning "=== BEFOREALL SETUP SCRIPT EXECUTING ==="
Write-Warning "Setting up test environment..."

# Example setup tasks:
# - Deploy test infrastructure
Expand All @@ -8,5 +8,5 @@ Write-Host "Setting up test environment..."
# - Set up test databases
# - Configure test services

Write-Host "Test environment setup completed successfully!"
Write-Host "=== BEFOREALL SETUP SCRIPT COMPLETED ==="
Write-Warning "Test environment setup completed successfully!"
Write-Warning "=== BEFOREALL SETUP SCRIPT COMPLETED ==="
10 changes: 5 additions & 5 deletions tests/srcWithManifestTestRepo/tests/AfterAll.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Write-Host "=== AFTERALL TEARDOWN SCRIPT (Environments) EXECUTING ==="
Write-Host "Tearing down test environment for Environments..."
Write-Warning "=== AFTERALL TEARDOWN SCRIPT (Environments) EXECUTING ==="
Write-Warning "Tearing down test environment for Environments..."

# Example teardown tasks for Environments directory:
Write-Host "Cleaning up Environments test environment..."
Write-Warning "Cleaning up Environments test environment..."

Write-Host "Environments environment teardown completed successfully!"
Write-Host "=== AFTERALL TEARDOWN SCRIPT (Environments) COMPLETED ==="
Write-Warning "Environments environment teardown completed successfully!"
Write-Warning "=== AFTERALL TEARDOWN SCRIPT (Environments) COMPLETED ==="
10 changes: 5 additions & 5 deletions tests/srcWithManifestTestRepo/tests/BeforeAll.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Write-Host "=== BEFOREALL SETUP SCRIPT EXECUTING ==="
Write-Host "Setting up test environment..."
Write-Warning "=== BEFOREALL SETUP SCRIPT EXECUTING ==="
Write-Warning "Setting up test environment..."

# Example setup tasks for test environment:
Write-Host "Initializing test environment..."
Write-Warning "Initializing test environment..."

Write-Host "Test environment setup completed successfully!"
Write-Host "=== BEFOREALL SETUP SCRIPT COMPLETED ==="
Write-Warning "Test environment setup completed successfully!"
Write-Warning "=== BEFOREALL SETUP SCRIPT COMPLETED ==="
Loading