🚀 [Feature]: Release-triggering file patterns now configurable#19
Conversation
There was a problem hiding this comment.
Pull request overview
Adds repository-configurable “important file” regex patterns to decide whether build/test/publish stages should run for a PR, replacing the previously hardcoded src/ + README.md checks.
Changes:
- Introduces
ImportantFilePatternsas a new action input (newline-separated) and settings-file property (array of regex strings). - Implements settings resolution in
main.ps1(settings file → action input → hardcoded fallback) and wires the resolved patterns into the returned settings object. - Updates the “no significant changes” PR comment to list the configured patterns dynamically.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/main.ps1 |
Resolves configurable important file patterns, uses them for change detection, and renders them in the PR skip comment. |
src/Settings.schema.json |
Adds schema support for ImportantFilePatterns as an array of strings. |
action.yml |
Adds ImportantFilePatterns input and passes it through via env var to main.ps1. |
README.md |
Documents the new input and settings-file configuration with examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/PSModule/Get-PSModuleSettings/sessions/0d571791-16d5-4312-a8fc-200cccf5df2b Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Fixed in 41cbece. Changed |
Repositories can now configure which file changes trigger build, test, and publish stages. Previously, only changes to
src/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 through the settings file or the action input.New: Configurable important file patterns
The
ImportantFilePatternssetting accepts an array of regex patterns. When a PR changes only files that don't match any pattern, build/test/publish stages are skipped.Via settings file (
.github/PSModule.yml):Via action input (newline-separated):
The setting fully replaces the defaults when configured. Include the default patterns in your list if you still want them.
Resolution order: settings file → action input → hardcoded fallback (
^src/,^README\.md$).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, rather than a hardcoded table.
Technical Details
action.yml: AddedImportantFilePatternsinput with newline-separated default and correspondingPSMODULE_GET_SETTINGS_INPUT_ImportantFilePatternsenv var.Settings.schema.json: Added top-levelImportantFilePatternsproperty as array of strings.main.ps1: Added resolution logic (settings file → parsed input → hardcoded default). Replaced hardcoded$importantPatternsarray with$settings.ImportantFilePatterns. Refactored PR comment to generate the pattern table dynamically.README.md: Documented the new input and settings file property with examples.