🚀 [Feature]: Release-triggering file patterns now configurable via workflow input#301
Conversation
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
1 similar comment
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
There was a problem hiding this comment.
Pull request overview
Adds support for configuring which file changes are considered “important” (and therefore trigger build/test/publish) by introducing an ImportantFilePatterns workflow input and documenting the new behavior.
Changes:
- Added
ImportantFilePatternsas aworkflow_callinput in the main reusable workflow and passed it through to theGet-Settingsreusable workflow. - Updated
Get-Settingsto passImportantFilePatternsintoPSModule/Get-PSModuleSettingsand bumped that action tov1.5.0(pinned SHA). - Updated
README.mdto document the new input, defaults, and configuration via.github/PSModule.yml.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Documents ImportantFilePatterns defaults and how to override via settings file or workflow input |
| .github/workflows/workflow.yml | Exposes ImportantFilePatterns as a reusable workflow input and forwards it to Get-Settings |
| .github/workflows/Get-Settings.yml | Forwards ImportantFilePatterns to PSModule/Get-PSModuleSettings and bumps action version |
| ```yaml | ||
| jobs: | ||
| Process: | ||
| uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v1 |
There was a problem hiding this comment.
The workflow-usage snippet under "You can also pass patterns via the workflow input" references PSModule/Process-PSModule/...@v1, but earlier in this README the recommended usage references ...@v5. Using a different major tag here is likely to mislead users into pinning an older major version; please align the example with the currently documented major version (or explicitly explain why v1 is correct here).
| uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v1 | |
| uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5 |
| When configured, the provided list fully replaces the defaults. Include the default patterns in your list if you still | ||
| want them to trigger releases. | ||
|
|
There was a problem hiding this comment.
The PR description states that ImportantFilePatterns: [] is a valid override to disable file-change triggering entirely, but this README section doesn’t mention that edge case (or how to represent it via workflow input). Please document the empty-list behavior explicitly so users can intentionally disable triggers without guessing how the resolver treats empty/blank inputs.
Repositories can now control which file changes trigger build, test, and publish stages through a new
ImportantFilePatternssetting. Previously, only changes tosrc/andREADME.mdwere recognized as significant — this was hardcoded and could not be overridden. Repositories that ship additional important files (e.g.,examples/, custom config) can now declare their own patterns.New: Configurable important file patterns
Two ways to configure which files trigger releases:
Via settings file (
.github/PSModule.yml) — takes highest priority:Via workflow input (newline-separated) — used when settings file does not define it:
Resolution order: settings file → workflow input → hardcoded defaults (
^src/,^README\.md$).The setting fully replaces the defaults when configured — include the default patterns in your list if you still want them. An empty array (
ImportantFilePatterns: []) is a valid override that means no file changes trigger releases.Changed: PR skip comment now reflects configured patterns
The PR comment posted when no important files changed now dynamically lists the actual patterns in effect, with proper Markdown escaping for patterns containing pipes or backticks.
Changed: Invalid patterns now fail fast
User-provided patterns are validated as regular expressions at settings resolution time. Invalid patterns produce a clear error message instead of crashing during the file-change detection loop.
Technical Details
workflow.yml: AddedImportantFilePatternsstring input, passed through toGet-Settingsjob.Get-Settings.yml: Added matching input, passed through toGet-PSModuleSettingsaction. Bumped action reference tov1.5.0(1e3d156).README.md: Documented the new input in the Inputs table, Configuration table, defaults YAML example, and rewrote the "Important file change detection" section with both configuration methods and resolution order.