Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
276f61e
📝[Enhancement]: Update workflow to use PowerShell shell and load dyna…
MariusStorhaug Oct 5, 2025
a37c7ff
📝[Enhancement]: Add Linter configuration options to skip linting and …
MariusStorhaug Oct 5, 2025
a84d166
📝[Enhancement]: Add environment variable listing step in workflow; re…
MariusStorhaug Oct 5, 2025
6f43f5c
📝[Fix]: Correctly convert Linter environment variables to JSON format…
MariusStorhaug Oct 5, 2025
1fde19c
📝[Fix]: Update Linter environment variable values to be strings in PS…
MariusStorhaug Oct 5, 2025
5dbed0d
📝[Fix]: Convert Linter environment variable 'VALIDATE_BIOME_FORMAT' t…
MariusStorhaug Oct 5, 2025
eb919e3
📝[Fix]: Ensure boolean values are correctly converted to strings in e…
MariusStorhaug Oct 5, 2025
08d2dd6
📝[Enhancement]: Add PR prompt template for generating release note st…
MariusStorhaug Oct 5, 2025
395e9b6
docs(prompts): remove fork-info.json dependency, use git remote detec…
MariusStorhaug Oct 5, 2025
ecd6ab8
docs(prompts): improve change type detection in /pr prompt
MariusStorhaug Oct 5, 2025
272019a
📝[Cleanup]: Remove redundant environment listing step from workflow
MariusStorhaug Oct 5, 2025
0316e9c
📝[Fix]: Update linter environment variables to use boolean values ins…
MariusStorhaug Oct 5, 2025
5ecbfea
📝[Enhancement]: Clarify repository mode operations and improve PR cre…
MariusStorhaug Oct 5, 2025
bfb31fb
Update /pr prompt to always stage, commit, and push changes
MariusStorhaug Oct 5, 2025
5906096
📝[Fix]: Update linter environment variable handling to improve JSON p…
MariusStorhaug Oct 5, 2025
fa11f8b
📝[Fix]: Update linter environment variable handling to use correct ke…
MariusStorhaug Oct 5, 2025
30dee94
📝[Fix]: Refactor environment variable handling to use SETTINGS for im…
MariusStorhaug Oct 5, 2025
3fd9bc2
📝[Fix]: Improve logging of settings loading in super-linter configura…
MariusStorhaug Oct 5, 2025
c994a0b
Update .github/workflows/workflow.yml
MariusStorhaug Oct 5, 2025
53a416c
📝[Fix]: Enhance repository handling instructions across prompts for c…
MariusStorhaug Oct 5, 2025
9df258f
docs(prompts): standardize PR description format for automated releases
MariusStorhaug Oct 5, 2025
d26a095
📝[Fix]: Refactor linter environment variable handling for improved cl…
MariusStorhaug Oct 5, 2025
c4d0a55
📝[Fix]: Add linter configuration to skip linting in test repository a…
MariusStorhaug Oct 5, 2025
0ab1adb
📝[Fix]: Correct typo in PR prompt documentation and enhance clarity i…
MariusStorhaug Oct 5, 2025
108d1a2
📝[Fix]: Update environment variable handling for super-linter and use…
MariusStorhaug Oct 5, 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
4 changes: 4 additions & 0 deletions .github/workflows/Get-Settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ jobs:
}

}
Linter = [pscustomobject]@{
Skip = $settings.Linter.Skip ?? $false
env = $settings.Linter.env ?? @{}
}
}
LogGroup "Final settings" {
switch -Regex ($settingsFile.Extension) {
Expand Down
32 changes: 23 additions & 9 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

defaults:
run:
shell: pwsh

jobs:
# Runs on:
# - ✅ Open/Updated PR - Always runs to load configuration
Expand All @@ -95,7 +99,7 @@ jobs:
Lint-Repository:
name: Lint code base
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.merged != true && github.event.action != 'closed'
if: github.event_name == 'pull_request' && github.event.pull_request.merged != true && github.event.action != 'closed' && fromJson(needs.Get-Settings.outputs.Settings).Linter.Skip != true
needs:
- Get-Settings
steps:
Expand All @@ -105,17 +109,27 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: Load dynamic envs
env:
RAW_JSON: ${{ fromJson(needs.Get-Settings.outputs.Settings).Linter.env }}
run: |
$map = $env:RAW_JSON | ConvertFrom-Json -AsHashtable

foreach ($key in $map.Keys) {
$value = $map[$key]

# Persist for following steps in this job
"$key=$value" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
}

- name: List all envs
run: |
Get-ChildItem env: | Format-Table -AutoSize

- name: Lint code base
uses: super-linter/super-linter@7bba2eeb89d01dc9bfd93c497477a57e72c83240 # v8.2.0
env:
GITHUB_TOKEN: ${{ github.token }}
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
VALIDATE_JSCPD: false
VALIDATE_JSON_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Runs on:
# - ✅ Open/Updated PR - Builds module for testing
Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ The following settings are available in the settings file:
| `Publish.Module.MinorLabels` | `String` | Labels indicating a minor version bump | `'minor, feature'` |
| `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.env` | `Object` | Environment variables for super-linter configuration | `{}` |

<details>
<summary>`PSModule.yml` with all defaults</summary>
Expand Down Expand Up @@ -328,6 +330,10 @@ Publish:
PatchLabels: 'patch, fix'
IgnoreLabels: 'NoRelease'

Linter:
Skip: false
env: {}

```
</details>

Expand Down Expand Up @@ -365,6 +371,31 @@ Build:
Skip: true
```

### Example 3 - Configuring the Repository Linter

This example shows how to configure the repository linter to skip certain validations or disable the linter entirely.

```yaml
# Skip the linter entirely
Linter:
Skip: true
```

```yaml
# Disable specific linter validations
Linter:
env:
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
VALIDATE_JSCPD: false
VALIDATE_JSON_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
```

For a complete list of available linter environment variables, see the [super-linter documentation](https://github.com/super-linter/super-linter#environment-variables).

## Specifications and practices

The process is compatible with:
Expand Down
22 changes: 0 additions & 22 deletions tests/srcWithManifestTestRepo/.github/PSModule.json

This file was deleted.

22 changes: 0 additions & 22 deletions tests/srcWithManifestTestRepo/.github/PSModule.psd1

This file was deleted.

9 changes: 9 additions & 0 deletions tests/srcWithManifestTestRepo/.github/PSModule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ Test:
PercentTarget: 1
Publish:
AutoCleanup: false
Linter:
env:
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
VALIDATE_JSCPD: false
VALIDATE_JSON_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
Loading