mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-03 09:39:38 +00:00
bug48: fix path filter so docs-only PRs are correctly excluded
The 'code' filter used only negated rules under the default 'some' quantifier. picomatch treats '!README.md' as "any path except README.md", so a changed README.md still matched a rule and set code=true, forcing a full build for docs-only PRs (as seen on PR #48). Add a positive '**' rule and set predicate-quantifier: 'every' (the pinned v3.0.3 does not support the v4-only 'some-with-excludes'), so code is true only when a changed file matches the '**' rule AND all '!' exclusions, i.e. it is a non-trivial file. Assisted-By: Claude Opus 4.8
This commit is contained in:
1 parent
2f5a5c1bc1
commit
03dbc43834
1 file changed
+9
@@ -60,8 +60,17 @@ jobs:
|
||||
# explicitly so a docs-only PR is correctly seen as no code change.
|
||||
base: ${{ github.event_name == 'pull_request_review' && github.event.pull_request.base.sha || '' }}
|
||||
ref: ${{ github.event_name == 'pull_request_review' && github.event.pull_request.head.sha || '' }}
|
||||
# With the default 'some' quantifier a negated rule still counts as a
|
||||
# match (picomatch treats '!README.md' as "anything but README.md"),
|
||||
# so a changed README.md would set code=true. The pinned v3.0.3 does
|
||||
# not support 'some-with-excludes' (a v4 addition), so use 'every':
|
||||
# code is true only when a changed file matches ALL rules, i.e. the
|
||||
# positive '**' AND every '!' exclusion (a trivial file fails one of
|
||||
# them and is thus excluded).
|
||||
predicate-quantifier: 'every'
|
||||
filters: |
|
||||
code:
|
||||
- '**'
|
||||
- '!wiki/**'
|
||||
- '!.github/workflows/*'
|
||||
- '!**/*.md'
|
||||
|
||||
Reference in new issue
Block a user