From 918b8e08ecd9e12c6f1685cb712bb8fe2fbf67d4 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Fri, 27 Mar 2026 23:47:26 +0100 Subject: [PATCH 01/15] Pass ImportantFilePatterns input through workflow chain --- .github/workflows/Get-Settings.yml | 8 ++++++++ .github/workflows/workflow.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/Get-Settings.yml b/.github/workflows/Get-Settings.yml index e2d407b3..1d9ca688 100644 --- a/.github/workflows/Get-Settings.yml +++ b/.github/workflows/Get-Settings.yml @@ -32,6 +32,13 @@ on: description: The path to the root of the repo. required: false default: '.' + ImportantFilePatterns: + type: string + description: | + Newline-separated list of regex patterns that identify important files. + Changes matching these patterns trigger build, test, and publish stages. + When set, fully replaces the defaults (^src/ and ^README\.md$). + required: false outputs: Settings: @@ -65,3 +72,4 @@ jobs: Verbose: ${{ inputs.Verbose }} Version: ${{ inputs.Version }} WorkingDirectory: ${{ inputs.WorkingDirectory }} + ImportantFilePatterns: ${{ inputs.ImportantFilePatterns }} diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 39615418..b9d5e35d 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -58,6 +58,13 @@ on: description: The path to the root of the repo. required: false default: '.' + ImportantFilePatterns: + type: string + description: | + Newline-separated list of regex patterns that identify important files. + Changes matching these patterns trigger build, test, and publish stages. + When set, fully replaces the defaults (^src/ and ^README\.md$). + required: false permissions: contents: write # to checkout the repo and create releases on the repo @@ -81,6 +88,7 @@ jobs: Verbose: ${{ inputs.Verbose }} Version: ${{ inputs.Version }} WorkingDirectory: ${{ inputs.WorkingDirectory }} + ImportantFilePatterns: ${{ inputs.ImportantFilePatterns }} # Runs on: # - ✅ Open/Updated PR - Lints code changes in active PRs From 1bf05fbf547f005bf854954cc6202bf35d2c7e04 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 28 Mar 2026 00:58:19 +0100 Subject: [PATCH 02/15] Document ImportantFilePatterns in README --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 24f22c6b..facab089 100644 --- a/README.md +++ b/README.md @@ -381,6 +381,7 @@ jobs: | `Version` | `string` | Specifies the version of the GitHub module to be installed. The value must be an exact version. | `false` | `''` | | `Prerelease` | `boolean` | Whether to use a prerelease version of the 'GitHub' module. | `false` | `false` | | `WorkingDirectory` | `string` | The path to the root of the repo. | `false` | `'.'` | +| `ImportantFilePatterns` | `string` | Newline-separated list of regular expression patterns that identify important files. Changes matching these patterns trigger build, test, and publish stages. When set, fully replaces the defaults. | `false` | `^src/` and `^README\.md$` | ### Secrets @@ -445,12 +446,43 @@ The workflow automatically detects whether a pull request contains changes to "i release. This prevents unnecessary releases when only non-functional files (such as workflow configurations, linter settings, or test files) are modified. -#### Files that trigger releases +#### Default patterns -| Path | Description | +By default, the following regular expression patterns identify important files: + +| Pattern | Description | | :--- | :---------- | -| `src/**` | Module source code | -| `README.md` | Module documentation | +| `^src/` | Module source code | +| `^README\.md$` | Module documentation | + +#### Customizing important file patterns + +To override the default patterns, set `ImportantFilePatterns` in your settings file (`.github/PSModule.yml`): + +```yaml +ImportantFilePatterns: + - '^src/' + - '^README\.md$' + - '^examples/' +``` + +When configured, the provided list fully replaces the defaults. Include the default patterns in your list if you still +want them to trigger releases. + +You can also pass patterns via the workflow input: + +```yaml +jobs: + Process: + uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v1 + with: + ImportantFilePatterns: | + ^src/ + ^README\.md$ + ^examples/ +``` + +Resolution order: settings file → workflow input → hardcoded defaults. #### Files that do NOT trigger releases @@ -459,14 +491,14 @@ Changes to the following files will not trigger a release: - `.github/workflows/*` - Workflow configurations - `.github/linters/*` - Linter configuration files - `tests/**` - Test files -- `examples/**` - Example scripts - `.gitignore`, `.editorconfig`, etc. - Repository configuration files #### Behavior when no important files are changed When a pull request does not contain changes to important files: -1. A comment is automatically added to the PR explaining why build/test stages are skipped +1. A comment is automatically added to the PR listing the configured patterns and explaining why build/test stages are + skipped 2. The `ReleaseType` output is set to `None` 3. Build, test, and publish stages are skipped 4. The PR can still be merged for non-release changes (documentation updates, CI improvements, etc.) @@ -484,6 +516,7 @@ The following settings are available in the settings file: | Name | Type | Description | Default | | ----------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | | `Name` | `String` | Name of the module to publish. Defaults to the repository name. | `null` | +| `ImportantFilePatterns` | `Array` | Regular expression patterns that identify important files. Changes matching these patterns trigger build, test, and publish stages. When set, fully replaces the defaults. | `['^src/', '^README\.md$']` | | `Test.Skip` | `Boolean` | Skip all tests | `false` | | `Test.Linux.Skip` | `Boolean` | Skip tests on Linux | `false` | | `Test.MacOS.Skip` | `Boolean` | Skip tests on macOS | `false` | @@ -532,6 +565,10 @@ The following settings are available in the settings file: ```yaml Name: null +ImportantFilePatterns: + - '^src/' + - '^README\.md$' + Build: Skip: false Module: From a98b0c57535bfdad366724211ffb4069cf5c79db Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 28 Mar 2026 01:29:31 +0100 Subject: [PATCH 03/15] Bump Get-PSModuleSettings to v1.5.0 --- .github/workflows/Get-Settings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Get-Settings.yml b/.github/workflows/Get-Settings.yml index 1d9ca688..d557d249 100644 --- a/.github/workflows/Get-Settings.yml +++ b/.github/workflows/Get-Settings.yml @@ -63,7 +63,7 @@ jobs: fetch-depth: 0 - name: Get-Settings - uses: PSModule/Get-PSModuleSettings@21c88f499579f56a60cced37872089d866b94a66 # v1.4.4 + uses: PSModule/Get-PSModuleSettings@1e3d156786c56e6fbd839a1ba5ab21ff8858090e # v1.5.0 id: Get-Settings with: SettingsPath: ${{ inputs.SettingsPath }} From dbe3a5bb83941b95e994a11409693151f6b1fc46 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 7 Apr 2026 13:25:26 +0200 Subject: [PATCH 04/15] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index facab089..f6fd9562 100644 --- a/README.md +++ b/README.md @@ -474,7 +474,7 @@ You can also pass patterns via the workflow input: ```yaml jobs: Process: - uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v1 + uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5 with: ImportantFilePatterns: | ^src/ From 7f37f2a1a9da2f4b2440a5a7c945e7ebc9357593 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 11:27:34 +0000 Subject: [PATCH 05/15] Document empty ImportantFilePatterns list behavior in README Agent-Logs-Url: https://github.com/PSModule/Process-PSModule/sessions/c8b1efd7-a1ef-4adb-8e15-04d7d96e26a7 Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com> --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 0a772815..5bd76a2d 100644 --- a/README.md +++ b/README.md @@ -480,6 +480,13 @@ ImportantFilePatterns: When configured, the provided list fully replaces the defaults. Include the default patterns in your list if you still want them to trigger releases. +To disable file-change triggering entirely (so that no file changes ever trigger a release), set an empty list in the +settings file: + +```yaml +ImportantFilePatterns: [] +``` + You can also pass patterns via the workflow input: ```yaml @@ -493,6 +500,9 @@ jobs: ^examples/ ``` +To disable triggering via workflow input, pass an empty string or omit the `with:` block entirely and rely on the +settings file instead. + Resolution order: settings file → workflow input → hardcoded defaults. #### Files that do NOT trigger releases From b0c069199820724db442ed954159a21efa055939 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 7 Apr 2026 13:30:56 +0200 Subject: [PATCH 06/15] Update .github/workflows/Get-Settings.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/Get-Settings.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/Get-Settings.yml b/.github/workflows/Get-Settings.yml index d557d249..860fb436 100644 --- a/.github/workflows/Get-Settings.yml +++ b/.github/workflows/Get-Settings.yml @@ -39,6 +39,9 @@ on: Changes matching these patterns trigger build, test, and publish stages. When set, fully replaces the defaults (^src/ and ^README\.md$). required: false + default: | + ^src/ + ^README\.md$ outputs: Settings: From 790ad675be5d5e5ae3b64baadef84c65e45c0317 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 11:33:43 +0000 Subject: [PATCH 07/15] Add default to workflow.yml ImportantFilePatterns and update README disable behavior Agent-Logs-Url: https://github.com/PSModule/Process-PSModule/sessions/088ca732-ee58-4c14-988d-37dedbcef078 Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com> --- .github/workflows/workflow.yml | 3 +++ README.md | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index b9d5e35d..9a4bc6af 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -65,6 +65,9 @@ on: Changes matching these patterns trigger build, test, and publish stages. When set, fully replaces the defaults (^src/ and ^README\.md$). required: false + default: | + ^src/ + ^README\.md$ permissions: contents: write # to checkout the repo and create releases on the repo diff --git a/README.md b/README.md index 5bd76a2d..b3eb7a82 100644 --- a/README.md +++ b/README.md @@ -500,8 +500,10 @@ jobs: ^examples/ ``` -To disable triggering via workflow input, pass an empty string or omit the `with:` block entirely and rely on the -settings file instead. +To disable triggering via workflow input, pass an explicit empty string. Note that omitting the input entirely causes +the workflow's default patterns (`^src/` and `^README\.md$`) to be used — the settings file takes priority over the +workflow input, so set `ImportantFilePatterns: []` in `.github/PSModule.yml` to disable triggering regardless of the +workflow input. Resolution order: settings file → workflow input → hardcoded defaults. From 386b01fd2c4b3866ba5b48f272e4601b8bbad5fa Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 7 Apr 2026 13:42:26 +0200 Subject: [PATCH 08/15] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/workflow.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 9a4bc6af..e8071d51 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -68,6 +68,9 @@ on: default: | ^src/ ^README\.md$ + default: | + ^src/ + ^README\.md$ permissions: contents: write # to checkout the repo and create releases on the repo From ab5c1a3cb75ca60018d3164c504cdf0bee3acb3a Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 7 Apr 2026 13:43:49 +0200 Subject: [PATCH 09/15] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b3eb7a82..ee575456 100644 --- a/README.md +++ b/README.md @@ -457,7 +457,7 @@ The workflow automatically detects whether a pull request contains changes to "i release. This prevents unnecessary releases when only non-functional files (such as workflow configurations, linter settings, or test files) are modified. -#### Default patterns +#### Files that trigger releases By default, the following regular expression patterns identify important files: From d94e9690ac64e73448296d6a40f5ec655bed9d3d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 11:46:37 +0000 Subject: [PATCH 10/15] Remove 'Files that do NOT trigger releases' section from README Agent-Logs-Url: https://github.com/PSModule/Process-PSModule/sessions/23b01067-5f4a-44e0-8b47-df4fa5abd9d0 Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com> --- README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/README.md b/README.md index ee575456..7582d173 100644 --- a/README.md +++ b/README.md @@ -507,15 +507,6 @@ workflow input. Resolution order: settings file → workflow input → hardcoded defaults. -#### Files that do NOT trigger releases - -Changes to the following files will not trigger a release: - -- `.github/workflows/*` - Workflow configurations -- `.github/linters/*` - Linter configuration files -- `tests/**` - Test files -- `.gitignore`, `.editorconfig`, etc. - Repository configuration files - #### Behavior when no important files are changed When a pull request does not contain changes to important files: From 03c2bef5e425a5fd6fa3af4507cc09a0ba57c2ab Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 7 Apr 2026 13:47:21 +0200 Subject: [PATCH 11/15] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/workflow.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e8071d51..9a4bc6af 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -68,9 +68,6 @@ on: default: | ^src/ ^README\.md$ - default: | - ^src/ - ^README\.md$ permissions: contents: write # to checkout the repo and create releases on the repo From 66ce1dc8a2acf17879899b5cdc846b53cf525339 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 7 Apr 2026 19:05:27 +0200 Subject: [PATCH 12/15] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7582d173..993f6690 100644 --- a/README.md +++ b/README.md @@ -505,7 +505,7 @@ the workflow's default patterns (`^src/` and `^README\.md$`) to be used — the workflow input, so set `ImportantFilePatterns: []` in `.github/PSModule.yml` to disable triggering regardless of the workflow input. -Resolution order: settings file → workflow input → hardcoded defaults. +Resolution order: settings file → workflow input → workflow input default values. #### Behavior when no important files are changed From c60f3f281e61a90c1baf627af30193ef04a74d0e Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 7 Apr 2026 19:05:38 +0200 Subject: [PATCH 13/15] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 993f6690..42bff808 100644 --- a/README.md +++ b/README.md @@ -392,7 +392,7 @@ jobs: | `Version` | `string` | Specifies the version of the GitHub module to be installed. The value must be an exact version. | `false` | `''` | | `Prerelease` | `boolean` | Whether to use a prerelease version of the 'GitHub' module. | `false` | `false` | | `WorkingDirectory` | `string` | The path to the root of the repo. | `false` | `'.'` | -| `ImportantFilePatterns` | `string` | Newline-separated list of regular expression patterns that identify important files. Changes matching these patterns trigger build, test, and publish stages. When set, fully replaces the defaults. | `false` | `^src/` and `^README\.md$` | +| `ImportantFilePatterns` | `string` | Newline-separated list of regular expression patterns that identify important files. Changes matching these patterns trigger build, test, and publish stages. When set, fully replaces the defaults. | `false` | `^src/\n^README\.md$` | ### Secrets From 1890a9fed57256e97abac25368448817a85dce66 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 17:07:17 +0000 Subject: [PATCH 14/15] Add concrete YAML example for passing empty ImportantFilePatterns via workflow input Agent-Logs-Url: https://github.com/PSModule/Process-PSModule/sessions/125e114f-636a-4271-8f37-f4ee9888f98e Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com> --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 42bff808..e456e9a4 100644 --- a/README.md +++ b/README.md @@ -500,10 +500,19 @@ jobs: ^examples/ ``` -To disable triggering via workflow input, pass an explicit empty string. Note that omitting the input entirely causes -the workflow's default patterns (`^src/` and `^README\.md$`) to be used — the settings file takes priority over the -workflow input, so set `ImportantFilePatterns: []` in `.github/PSModule.yml` to disable triggering regardless of the -workflow input. +To disable triggering via the workflow input, pass an explicit empty string: + +```yaml +jobs: + process: + uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5 + with: + ImportantFilePatterns: '' +``` + +Note that omitting the `ImportantFilePatterns` key entirely causes the workflow's default patterns (`^src/` and +`^README\.md$`) to be used. The settings file takes priority over the workflow input, so set +`ImportantFilePatterns: []` in `.github/PSModule.yml` to disable triggering regardless of the workflow input. Resolution order: settings file → workflow input → workflow input default values. From 01f80af89f6322e023edf5495ed819cb893034d1 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 7 Apr 2026 20:37:19 +0200 Subject: [PATCH 15/15] Fix broken TOC link to removed heading --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e456e9a4..c74caadb 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Depending on the labels in the pull requests, the [workflow will result in diffe - [Scenario Matrix](#scenario-matrix) - [Important file change detection](#important-file-change-detection) - [Files that trigger releases](#files-that-trigger-releases) - - [Files that do NOT trigger releases](#files-that-do-not-trigger-releases) + - [Customizing important file patterns](#customizing-important-file-patterns) - [Behavior when no important files are changed](#behavior-when-no-important-files-are-changed) - [Configuration](#configuration) - [Example 1 - Defaults with Code Coverage target](#example-1---defaults-with-code-coverage-target)