Commit 1e3d156
π [Feature]: Release-triggering file patterns now configurable (#19)
Repositories can now configure which file changes trigger build, test,
and publish stages. Previously, only changes to `src/` and `README.md`
were 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.
- Fixes PSModule/Process-PSModule#278
## New: Configurable important file patterns
The `ImportantFilePatterns` setting 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`):
```yaml
ImportantFilePatterns:
- '^src/'
- '^README\.md$'
- '^examples/'
```
**Via action input** (newline-separated):
```yaml
- uses: PSModule/Get-PSModuleSettings@v1
with:
ImportantFilePatterns: |
^src/
^README\.md$
^examples/
```
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`: Added `ImportantFilePatterns` input with
newline-separated default and corresponding
`PSMODULE_GET_SETTINGS_INPUT_ImportantFilePatterns` env var.
- `Settings.schema.json`: Added top-level `ImportantFilePatterns`
property as array of strings.
- `main.ps1`: Added resolution logic (settings file β parsed input β
hardcoded default). Replaced hardcoded `$importantPatterns` array with
`$settings.ImportantFilePatterns`. Refactored PR comment to generate the
pattern table dynamically.
- `README.md`: Documented the new input and settings file property with
examples.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>1 parent 21c88f4 commit 1e3d156
3 files changed
Lines changed: 63 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
| |||
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
| 63 | + | |
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
12 | 20 | | |
13 | 21 | | |
14 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
92 | 116 | | |
93 | | - | |
94 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
95 | 120 | | |
96 | 121 | | |
97 | 122 | | |
| |||
147 | 172 | | |
148 | 173 | | |
149 | 174 | | |
150 | | - | |
| 175 | + | |
151 | 176 | | |
152 | 177 | | |
153 | 178 | | |
| |||
160 | 185 | | |
161 | 186 | | |
162 | 187 | | |
163 | | - | |
| 188 | + | |
164 | 189 | | |
165 | 190 | | |
166 | 191 | | |
| |||
178 | 203 | | |
179 | 204 | | |
180 | 205 | | |
181 | | - | |
| 206 | + | |
182 | 207 | | |
183 | 208 | | |
184 | 209 | | |
| |||
231 | 256 | | |
232 | 257 | | |
233 | 258 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 259 | + | |
239 | 260 | | |
240 | 261 | | |
241 | 262 | | |
| |||
251 | 272 | | |
252 | 273 | | |
253 | 274 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 275 | + | |
| 276 | + | |
259 | 277 | | |
260 | 278 | | |
261 | 279 | | |
| |||
276 | 294 | | |
277 | 295 | | |
278 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
279 | 307 | | |
280 | 308 | | |
281 | 309 | | |
282 | 310 | | |
283 | 311 | | |
284 | | - | |
| 312 | + | |
285 | 313 | | |
286 | | - | |
287 | | - | |
| 314 | + | |
288 | 315 | | |
289 | 316 | | |
290 | 317 | | |
| |||
0 commit comments